Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added support for logging to a file
[NEW] Added the
fileProperties
parameter to theLogger
constructor, which includes the following properties:enable: enable logging to a file (defaults to
false
) [Iffalse
all the other properties will be ignored]logFolderPath: path to the folder where the log files will be stored (will be created if it doesn't exist, defaults to
./logs
)enableLatestLog?: if true, the latest log file will be stored in the
logFolderPath
with the namelatest.log
(defaults totrue
)enableDebugLog?: if true, the debug log will be stored in the
logFolderPath
inside a folder namedlatestLogs
with the namedebug.log
(defaults totrue
)enableErrorLog?: if true, the error log will be stored in the
logFolderPath
inside a folder namedlatestLogs
with the nameerror.log
(defaults tofalse
)enableFatalLog?: if true, the fatal log will be stored in the
logFolderPath
inside a folder namedfatal-crash
with the namefatal-DATE.log
(defaults totrue
)generateHTMLLog?: if true, the log files will be generated in HTML format (their extension will change from .log to .html) (defaults to
false
)compressLogFilesAfterNewExecution?: if true, the log files will be compressed to a zip file after a new execution of the program (defaults to
true
)[NEW] Added support to log objects, arrays, etc. Like the default
console.log
function.[BREAKING] Changed the export of AutoLogEnd now importing the package will return the
Logger
class and an object namedAutoLogEnd
with theactivate
anddeactivate
functions.[NEW] AutoLogEnd
activate
function now accepts aLogger
instance as 2º parameter. If not given, it will create a new instance ofLogger
with the default parameters. Otherwise, it will use the given instance.