WIP : Elektron Logging library #16

Merged
balandi1 merged 50 commits from master into master 2019-12-10 01:15:34 +00:00

50 commits

Author SHA1 Message Date
balandi1
66c4d490b2 Added license to the new go files 2019-12-09 20:05:28 -05:00
balandi1
f19773e21f Merge branch 'master' of https://github.com/balandi1/elektron 2019-12-09 12:55:37 -05:00
balandi1
2edd0532aa Removed format from logConfig.yaml
Not used anywhere
2019-12-09 12:52:45 -05:00
Bhargavi Hanumant Alandikar
38c5142d01
Added documentation for log configurations 2019-12-09 12:38:28 -05:00
Bhargavi Hanumant Alandikar
67af2b72ba
Renamed log type
Renamed CLSFN_TASKDIST_OVERHEAD to CLSFN_TASKDISTR_OVERHEAD
2019-12-09 11:40:58 -05:00
Bhargavi Hanumant Alandikar
01c130561b
Updated log format for PCP 2019-12-09 11:39:21 -05:00
Bhargavi Hanumant Alandikar
49cc32134b
Updated log format for CLSFN_TASKDISTR_OVERHEAD 2019-12-09 11:32:29 -05:00
Bhargavi Hanumant Alandikar
57d0ea278d
Minor format fix 2019-12-09 11:28:37 -05:00
Bhargavi Hanumant Alandikar
6a577a4135
Updated log format for SCHED_WINDOW 2019-12-09 11:27:33 -05:00
Bhargavi Hanumant Alandikar
ad78b7827e
Updated log format for SPS 2019-12-09 11:24:47 -05:00
Bhargavi Hanumant Alandikar
053fc02ac0
Updated log format for schedTrace 2019-12-09 11:21:27 -05:00
balandi1
0ecbe55398 Function renaming
Renamed 'GetConfig()' to 'getConfig()', so that it is not exposed
outside the package.
2019-12-09 11:03:40 -05:00
balandi1
027adef642 Code and formatting fixes
Changed the shorthand for log config flag.
Fixed formatting as mentioned.
Removed unnecessary function declarations from elektronLogger interface.
Disabled schedWindow and clsfnTaskDistrOverhead in config file.
2019-12-09 10:55:34 -05:00
balandi1
02abb1e882 Added functions to access members
Functions to access all members of baseElektronLogger.config
2019-12-06 12:59:35 -05:00
Bhargavi Hanumant Alandikar
da6577fc68
Merge pull request #1 from pradykaushik/switch-to-logrus-contrib
move config to loggers, refactoring, wrapping Log() and Logf()
2019-12-06 12:36:05 -05:00
Pradyumna Kaushik
5a53998942 fixed visibility of structs. 2019-12-05 23:02:08 -05:00
Pradyumna Kaushik
f084eddd68 passing strings instead of pointers as values. 2019-12-05 22:49:19 -05:00
Pradyumna Kaushik
12f827c0fe Used WithField() and Logf() where required.
Used elektronLogger#WithField(...) for single key-value pair.
Used elektronLogger#Logf(...) where formatted string is required.
2019-12-05 22:33:28 -05:00
Pradyumna Kaushik
3b70a13cc8 refactored logging/types imports to dot imports 2019-12-05 21:43:16 -05:00
Pradyumna Kaushik
6fb0e4a3fe move cfg to loggers + refactor + log fn wrappers
1. Instead of maintaining a global config, each specialized logger
now stores its config.
2. Refactored logInterface to elektronLogger.
3. Refactored loggerImpl to baseElektronLogger to be consistent with
the rest of the code base.
4. Wrapped elektronLogger#Log(...) and elektronLogf(...) so that we
do not have to use the instance of elektronLogger everytime we want
to log. Instead, we just do logging.Log(...) or logging.Logf(...).
5. Wrapped elektronLogger#WithFields(...) and
elektronLogger#WithField(...).
6. Refactored codebase to adhere to the changes.
2019-12-05 21:32:37 -05:00
Pradyumna Kaushik
5a6d1bed4a refactored Dist to Distr in clsfnTaskDistOverheadLogger.go 2019-12-05 17:40:00 -05:00
Pradyumna Kaushik
3d201bf437 refactored elektronLogging to logging 2019-12-05 17:38:56 -05:00
balandi1
bd8ddd1835 Refactored Code
Moved the 'logDir' and 'logger' global variables into 'loggerImpl' struct
Renamed struct names and interface name
2019-12-05 15:01:11 -05:00
balandi1
64ab443d25 Minor code style fixes
Removed the global logger instance and kept it in LoggerImpl
struct.
Changed access level for members of LoggerImpl.
2019-12-04 14:56:48 -05:00
balandi1
c914161643 Minor bug fixes 2019-12-04 14:08:17 -05:00
balandi1
bedfa52d7a Added functions to logging library
Added Logf() and WithFields() functions.
Logf() for logging formatted messages.
WithFields() for handling optional log fields.
2019-12-04 13:16:48 -05:00
balandi1
b9592ed31c Removed Log Color Codes
Since the color codes were displayed in an inappropriate manner,
removed them from all logs
.
2019-11-26 18:12:55 -05:00
balandi1
d0e989136e Handled ennabling/disabling log types
Added enabled check while creating log files and logging.
Do not allow to create log file or log if the log type is disabled.
2019-11-26 18:02:24 -05:00
balandi1
0c0361e209 Code Refactoring
Modified comments. Organized imports.
2019-11-26 14:24:20 -05:00
balandi1
2fa3bebaa6 Removed dummy head logger
Replaced dummy head logger instance with ConsoleLogger
instance in the chain.
2019-11-26 13:54:02 -05:00
balandi1
c66afa62b2 Code refactoring
Removed lmt usage in base.go.
Removed unneccessary fmt.Sprintf() usage.
2019-11-26 13:40:37 -05:00
balandi1
bb8c0a79d6 Minor code improvements
Removed commented code. Resolved spacing issue in yaml.
2019-11-26 13:19:15 -05:00
balandi1
24dbbb208f Flag for Logger Config yaml file name
Removed yaml filename from env.go and added its flag to scheduler.go
2019-11-26 13:08:45 -05:00
balandi1
ef6d154d06 Refactoring Code
Renamed PcpLogger, SetLogFile(), LogFileName. Changed error messages in loggerConfig.
2019-11-26 12:48:48 -05:00
balandi1
370a490643 Code Refactoring and modifications 2019-11-21 18:04:59 -05:00
balandi1
eaac82ceb9 Few code improvements and refactoring 2019-11-21 15:26:57 -05:00
balandi1
cb5df9acc8 Removed ERROR, GENERAL, SUCCESS, WARNING log types 2019-11-21 14:58:14 -05:00
balandi1
268df3cd51 Changed alias for elektronLogging to elekLog 2019-11-21 14:35:20 -05:00
balandi1
270c8669e6 Revert previous commit. Renamed wrong alias 2019-11-21 14:12:53 -05:00
balandi1
9952b9861d Renamed alias log to elekLog 2019-11-21 14:02:47 -05:00
balandi1
7996240b2e Encapsulated log directory name into a struct 2019-11-21 13:47:22 -05:00
balandi1
13c3de44be Changed alias elekLogT to elekLogTypes 2019-11-21 13:05:52 -05:00
balandi1
20f2f1e8c5 Used string join at neccesary places. Removed unused code 2019-11-20 16:11:33 -05:00
balandi1
4d15e59d4c Code formatting 2019-11-20 13:33:46 -05:00
balandi1
ef8bd6ac1f Fixed minor bug 2019-11-13 16:16:58 -05:00
balandi1
cef6efee33 Deleted the unused logging library 2019-11-13 16:10:19 -05:00
balandi1
40efeca04b Replaced old usage with new library 2019-11-13 15:37:55 -05:00
balandi1
c27aba895b Changes made everywhere inorder to use elektronLogging library for logging 2019-11-13 14:08:52 -05:00
balandi1
b501054412 Changes made everywhere inorder to use elektron logging library for logging 2019-11-13 14:04:21 -05:00
balandi1
1fd6c7e4f4 Initial elektromLogging library 2019-11-13 11:19:04 -05:00