Logger: Abstract #21
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We need a logger for actions of our package manager
ABSTRACT
Expecting 6 methods - info, warn, error, trace, fixme, unimplemented
All messages are expected to be customizable by the user/dev who is using our package manager
Logs should be store in file hierarchy defined log directory (on FSH3.0 that is /var/log/name)
admin c:\programdata\nameanduser c:\users\user\appdata\local\nameMessages in CLI should be easy to understand by a dumb kid (for sake of example 6yo kid)
Messages in logs should be directed on developers
INFO
Message used to inform about something
INFO: messagein stout of used console ifquietflag is NOT parsed[timestamp INFO filename] messagein logsWARN
Message used to warn about something
WARN: messagein stout of used console ifquietflag is NOT parsed[timestamp WARN filename] messagein logsERROR
Inform the user/dev about non-fatal errors during the runtime
ERROR: messagein sterr of used console[timestamp ERROR filename] messagein logsFIXME
Inform the user/dev about non-fatal error about unimplemented features that require contribution/fixing and for quality assurance checks
Example in shell (assuming that shell is widely understood):
FIXME: messageby default that can be muted by the user/dev configuration[timestamp FIXME filename] messagein logsTRACE
Verbose information about runtime of program used for diagnostics
TRACE: messageif verbose flag is parsed by user/dev in cli[timestamp TRACE filename] messagein logsmain -vvvis parsed -> Output all the information we can else ifmain -vis parsed output only essentials.UNIMPLEMENTED
Output fatal message informing about unimplemented feature (simmilar to FIXME but fatal)
UNIMPLEMENTED: messagein sterr of used console[timestamp UNIMPLEMENTED filename] messagein logsStale issue message