From 994db357986ca95ccd4527efa93941844092fca6 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Tue, 1 Nov 2016 09:37:34 -0700 Subject: [PATCH 01/13] create log.md --- File-Formats/text/log.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 File-Formats/text/log.md diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md new file mode 100644 index 0000000..5bc3667 --- /dev/null +++ b/File-Formats/text/log.md @@ -0,0 +1,24 @@ +## *COS 2:* Logs + +|Information | | +|------------|----------------| +|Type |Log File | +|MIME |'text/log' | +|Extensions |'.log' | + +##Technical Details +.log files should contain valid logged data, including the type of the written data, +the written data and the time when the data was written. As of Version 1.0.0.0 there are +4 types, which are the following: +'[INFO]' - For the information of the User +'[SEVERE]' - For the indication that a non-critical problem existed +'[ERROR]' - For the indication that a critical problem although it didn't crash the program existed +'[CRITICAL]' - For the indication that a critical problem that crashed the program existed + +##Examples +#Installation +--TODO-- + +#Usage +A example file, 'log1.log', would be this: +'[23:21][INFO]: Booted TestOS' From f4dba7b7aec14f9efc58ac4d7a1d6a6a29d71571 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Tue, 1 Nov 2016 09:50:29 -0700 Subject: [PATCH 02/13] Update log.md --- File-Formats/text/log.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 5bc3667..2451185 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -15,10 +15,14 @@ the written data and the time when the data was written. As of Version 1.0.0.0 t '[ERROR]' - For the indication that a critical problem although it didn't crash the program existed '[CRITICAL]' - For the indication that a critical problem that crashed the program existed +*Avaiable Utilities* +As of version 1.0.0.0 no Utilities come with this standard. + ##Examples -#Installation ---TODO-- +*Installation* +A Universal Parser and Creator of the log files defined here can be found at https://github.com/MrObsidy/CC-LogParserAPI . +(It is obtainable in-game via lyqyd's packman as mrobsidy/logparser) -#Usage +*Usage* A example file, 'log1.log', would be this: '[23:21][INFO]: Booted TestOS' From 12e14b43e285fe88a0f400d383c5eee89602ce82 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Tue, 1 Nov 2016 09:51:31 -0700 Subject: [PATCH 03/13] Update log.md --- File-Formats/text/log.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 2451185..ae8e206 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -20,9 +20,12 @@ As of version 1.0.0.0 no Utilities come with this standard. ##Examples *Installation* -A Universal Parser and Creator of the log files defined here can be found at https://github.com/MrObsidy/CC-LogParserAPI . + +A Universal Parser and Creator of the log files defined here can be found at https://github.com/MrObsidy/CC-LogParserAPI (It is obtainable in-game via lyqyd's packman as mrobsidy/logparser) *Usage* + A example file, 'log1.log', would be this: + '[23:21][INFO]: Booted TestOS' From 6d4486c5ed481602b4f94bc7f4628a13372fe369 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Tue, 1 Nov 2016 09:53:06 -0700 Subject: [PATCH 04/13] fixed syntax --- File-Formats/text/log.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index ae8e206..85f877d 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -3,8 +3,8 @@ |Information | | |------------|----------------| |Type |Log File | -|MIME |'text/log' | -|Extensions |'.log' | +|MIME |`text/log` | +|Extensions |`.log` | ##Technical Details .log files should contain valid logged data, including the type of the written data, @@ -28,4 +28,4 @@ A Universal Parser and Creator of the log files defined here can be found at htt A example file, 'log1.log', would be this: -'[23:21][INFO]: Booted TestOS' +`[23:21][INFO]: Booted TestOS'` From 89b6f373dccd7c8e6a0f01907617430a380d1631 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:25:42 -0700 Subject: [PATCH 05/13] Update log.md --- File-Formats/text/log.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 85f877d..12474da 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -10,10 +10,14 @@ .log files should contain valid logged data, including the type of the written data, the written data and the time when the data was written. As of Version 1.0.0.0 there are 4 types, which are the following: -'[INFO]' - For the information of the User -'[SEVERE]' - For the indication that a non-critical problem existed -'[ERROR]' - For the indication that a critical problem although it didn't crash the program existed -'[CRITICAL]' - For the indication that a critical problem that crashed the program existed + +`[INFO]` - For the information of the User + +`[SEVERE]` - For the indication that a non-critical problem existed + +`[ERROR]` - For the indication that a critical problem although it didn't crash the program existed + +`[CRITICAL]` - For the indication that a critical problem that crashed the program existed *Avaiable Utilities* As of version 1.0.0.0 no Utilities come with this standard. @@ -24,8 +28,13 @@ As of version 1.0.0.0 no Utilities come with this standard. A Universal Parser and Creator of the log files defined here can be found at https://github.com/MrObsidy/CC-LogParserAPI (It is obtainable in-game via lyqyd's packman as mrobsidy/logparser) +*Syntax* +The Timestamp has to be obtained using this (or a similar) way: +`textutils.formatTime(os.time(), true)` +--Please note that the time is given in 24-Hour-Clock. This should stay that way to avoid confusion and make reading the log by external programs a lot easier. + *Usage* A example file, 'log1.log', would be this: -`[23:21][INFO]: Booted TestOS'` +`[23:21][INFO]: Booted TestOS` From bc93df7187a99d332c23a3bfadf6edd4f4e4f0dc Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:26:53 -0700 Subject: [PATCH 06/13] Update log.md --- File-Formats/text/log.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 12474da..060922d 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -31,7 +31,10 @@ A Universal Parser and Creator of the log files defined here can be found at htt *Syntax* The Timestamp has to be obtained using this (or a similar) way: `textutils.formatTime(os.time(), true)` +``` lua --Please note that the time is given in 24-Hour-Clock. This should stay that way to avoid confusion and make reading the log by external programs a lot easier. +``` + *Usage* From 3391f9649f9d7022872077225274ee53faa1abf4 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:27:14 -0700 Subject: [PATCH 07/13] Update log.md --- File-Formats/text/log.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 060922d..99d1f9f 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -32,7 +32,8 @@ A Universal Parser and Creator of the log files defined here can be found at htt The Timestamp has to be obtained using this (or a similar) way: `textutils.formatTime(os.time(), true)` ``` lua ---Please note that the time is given in 24-Hour-Clock. This should stay that way to avoid confusion and make reading the log by external programs a lot easier. +Please note that the time is given in 24-Hour-Clock. This should stay that way to avoid +confusion and make reading the log by external programs a lot easier. ``` From 950e1241f497f376db779ab5f46a21cf74f7abfc Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:27:32 -0700 Subject: [PATCH 08/13] Update log.md --- File-Formats/text/log.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 99d1f9f..3e4a9c5 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -31,7 +31,7 @@ A Universal Parser and Creator of the log files defined here can be found at htt *Syntax* The Timestamp has to be obtained using this (or a similar) way: `textutils.formatTime(os.time(), true)` -``` lua +``` Please note that the time is given in 24-Hour-Clock. This should stay that way to avoid confusion and make reading the log by external programs a lot easier. ``` From 0d45bfa085c000bc3d27aa4a778d7ea013d0f0b5 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:43:54 -0700 Subject: [PATCH 09/13] changed a butt ton of shenanigans --- File-Formats/text/log.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 3e4a9c5..136dbcf 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -13,9 +13,9 @@ the written data and the time when the data was written. As of Version 1.0.0.0 t `[INFO]` - For the information of the User -`[SEVERE]` - For the indication that a non-critical problem existed +`[ERROR]` - For the indication that a non-critical problem existed -`[ERROR]` - For the indication that a critical problem although it didn't crash the program existed +`[SEVERE]` - For the indication that a critical problem although it didn't crash the program existed `[CRITICAL]` - For the indication that a critical problem that crashed the program existed @@ -29,16 +29,37 @@ A Universal Parser and Creator of the log files defined here can be found at htt (It is obtainable in-game via lyqyd's packman as mrobsidy/logparser) *Syntax* + The Timestamp has to be obtained using this (or a similar) way: `textutils.formatTime(os.time(), true)` ``` Please note that the time is given in 24-Hour-Clock. This should stay that way to avoid confusion and make reading the log by external programs a lot easier. ``` +A log entry is terminated by the end of a line. A valid log entry is built up like this: +` +[time in 24-Hour][INFO/SEVERE/ERROR/CRITICAL]: log content +` +The log content is not further defined and can be freely chosen, however, there are some recommendations: + +A `[CRITICAL]` tag in a log should _only_ be used to display a critical error with a resulting crash of the program and the following crash-report + +A `[SEVERE]` tag in a log should _only_ be used to display a severe error that may limit the usage of the program, although not closing/crashing it + +A `[ERROR]` tag in a log should _only_ be used to display a minor error that has no furhter effects on the program +A `[INFO]` tag in a log should be used for everything that is not a error, Wrong user inputs (like for example a wrong password entered or a number was expected and a string given) or general information. *Usage* A example file, 'log1.log', would be this: -`[23:21][INFO]: Booted TestOS` +`[23:21][INFO]: Booted TestOS +[23:23][ERROR]: No rednet modem found +[23:27][INFO]: User(testuser) entered wrong password +[23:28][INFO]: User(testuser) logged in Succesfully +[23:29][SEVERE]: Desktop could not be generated, falling back to text mode +[23:30][CRITICAL]: Fallback failed! TestOS has crashed, this is the crash report: (also saved to cras-report.txt) +[23:30][CRITICAL]: failed to call displayTerminal() in kernel.lua, syntax error on line 274 +[23:30][CRITICAL]: desktopFail() in display.lib tried calling _G[ kernel.lua ].displayTerminal() +` From 796b552676c1c29887aa8ccabae104f4617c11ef Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:44:33 -0700 Subject: [PATCH 10/13] Update log.md --- File-Formats/text/log.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 136dbcf..9e2eac2 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -37,9 +37,11 @@ Please note that the time is given in 24-Hour-Clock. This should stay that way t confusion and make reading the log by external programs a lot easier. ``` A log entry is terminated by the end of a line. A valid log entry is built up like this: + ` [time in 24-Hour][INFO/SEVERE/ERROR/CRITICAL]: log content ` + The log content is not further defined and can be freely chosen, however, there are some recommendations: A `[CRITICAL]` tag in a log should _only_ be used to display a critical error with a resulting crash of the program and the following crash-report @@ -55,11 +57,18 @@ A `[INFO]` tag in a log should be used for everything that is not a error, Wrong A example file, 'log1.log', would be this: `[23:21][INFO]: Booted TestOS + [23:23][ERROR]: No rednet modem found + [23:27][INFO]: User(testuser) entered wrong password + [23:28][INFO]: User(testuser) logged in Succesfully + [23:29][SEVERE]: Desktop could not be generated, falling back to text mode + [23:30][CRITICAL]: Fallback failed! TestOS has crashed, this is the crash report: (also saved to cras-report.txt) + [23:30][CRITICAL]: failed to call displayTerminal() in kernel.lua, syntax error on line 274 + [23:30][CRITICAL]: desktopFail() in display.lib tried calling _G[ kernel.lua ].displayTerminal() ` From fbf1ac77f2eb4f605df178815fa9eae560129890 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:46:28 -0700 Subject: [PATCH 11/13] Update log.md --- File-Formats/text/log.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 9e2eac2..d88ea79 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -56,7 +56,8 @@ A `[INFO]` tag in a log should be used for everything that is not a error, Wrong A example file, 'log1.log', would be this: -`[23:21][INFO]: Booted TestOS +``` +[23:21][INFO]: Booted TestOS [23:23][ERROR]: No rednet modem found @@ -71,4 +72,4 @@ A example file, 'log1.log', would be this: [23:30][CRITICAL]: failed to call displayTerminal() in kernel.lua, syntax error on line 274 [23:30][CRITICAL]: desktopFail() in display.lib tried calling _G[ kernel.lua ].displayTerminal() -` +``` From ec7de98013a1f498d997586b2964c2e04b92a637 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:46:44 -0700 Subject: [PATCH 12/13] Update log.md --- File-Formats/text/log.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index d88ea79..11fa134 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -58,18 +58,11 @@ A example file, 'log1.log', would be this: ``` [23:21][INFO]: Booted TestOS - [23:23][ERROR]: No rednet modem found - [23:27][INFO]: User(testuser) entered wrong password - [23:28][INFO]: User(testuser) logged in Succesfully - [23:29][SEVERE]: Desktop could not be generated, falling back to text mode - [23:30][CRITICAL]: Fallback failed! TestOS has crashed, this is the crash report: (also saved to cras-report.txt) - [23:30][CRITICAL]: failed to call displayTerminal() in kernel.lua, syntax error on line 274 - [23:30][CRITICAL]: desktopFail() in display.lib tried calling _G[ kernel.lua ].displayTerminal() ``` From 63c87229f479bd48d7f5fc664386b437f4e3c271 Mon Sep 17 00:00:00 2001 From: MrObsidy Date: Wed, 2 Nov 2016 21:47:23 -0700 Subject: [PATCH 13/13] fixed typo --- File-Formats/text/log.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/File-Formats/text/log.md b/File-Formats/text/log.md index 11fa134..d755c3a 100644 --- a/File-Formats/text/log.md +++ b/File-Formats/text/log.md @@ -62,7 +62,7 @@ A example file, 'log1.log', would be this: [23:27][INFO]: User(testuser) entered wrong password [23:28][INFO]: User(testuser) logged in Succesfully [23:29][SEVERE]: Desktop could not be generated, falling back to text mode -[23:30][CRITICAL]: Fallback failed! TestOS has crashed, this is the crash report: (also saved to cras-report.txt) +[23:30][CRITICAL]: Fallback failed! TestOS has crashed, this is the crash report: (also saved to crash-report.txt) [23:30][CRITICAL]: failed to call displayTerminal() in kernel.lua, syntax error on line 274 [23:30][CRITICAL]: desktopFail() in display.lib tried calling _G[ kernel.lua ].displayTerminal() ```