{"id":23033983,"url":"https://github.com/olback/solid-log","last_synced_at":"2025-04-02T22:14:43.514Z","repository":{"id":57365866,"uuid":"188312856","full_name":"olback/solid-log","owner":"olback","description":"Simple Logging Framwork for Node","archived":false,"fork":false,"pushed_at":"2019-05-25T13:27:53.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T12:31:22.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olback.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-23T22:03:55.000Z","updated_at":"2020-01-28T13:34:07.000Z","dependencies_parsed_at":"2022-08-23T20:10:30.068Z","dependency_job_id":null,"html_url":"https://github.com/olback/solid-log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olback%2Fsolid-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olback%2Fsolid-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olback%2Fsolid-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olback%2Fsolid-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olback","download_url":"https://codeload.github.com/olback/solid-log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246899668,"owners_count":20851898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T16:28:31.936Z","updated_at":"2025-04-02T22:14:43.498Z","avatar_url":"https://github.com/olback.png","language":"TypeScript","readme":"# solid-log\n\n```typescript\nimport * as slog from 'solid-log';\n\nconst fileLogger = new slog.FileLogger(_logLevel?: LogLevel, options?: IFileLoggerOptions);\nconst consoleLogger = new slog.ConsoleLogger(_logLevel?: LogLevel, options?: IConsoleLoggerOptions);\n\nslog.add(fileLogger);\nslog.add(consoleLogger);\n```\n\nOptions:\n```typescript\n// %d Current date. (new Date().toLocaleDateString())\n// %t Current time (new Date().toLocaleTimeString())\n// %v Values to log.\n// %l Log level.\n// %s Delimiter.\nexport interface IFormat {\n    delimiter: string; // default '\\t'\n    format: string; // default '%l%s[%d %t]%s%v'\n}\n\ninterface IFileLoggerOptions {\n    format?: IFormat;\n    path?: string | null;\n}\n\ninterface IConsoleLoggerOptions {\n    format?: IFormat;\n    useColors?: boolean;\n}\n```\n\nLog methods:\n```javascript\nslog.debug(message);\nslog.info(message);\nslog.ok(message);\nslog.warn(message);\nslog.error(message);\nslog.panic(message);\n```\n\nLog levels:\n```javascript\nslog.LogLevel.debug\nslog.LogLevel.info\nslog.LogLevel.ok\nslog.LogLevel.warn // default log level\nslog.LogLevel.error\nslog.LogLevel.panic\n```\nOutput from the test file:\n```terminal\n[DEBUG]\t[5/25/2019 2:07:41 PM]\tdebug\n[INFO]\t[5/25/2019 2:07:41 PM]\tinfo\n[OK]\t[5/25/2019 2:07:41 PM]\tok\n[WARN]\t[5/25/2019 2:07:41 PM]\twarn\n[ERROR]\t[5/25/2019 2:07:41 PM]\terror\n[PANIC]\t[5/25/2019 2:07:41 PM]\tpanic\n[PANIC]\t[5/25/2019 2:07:41 PM]\tReferenceError: aaaaaaa is not defined\n    at Object.\u003canonymous\u003e (/home/olback/Desktop/js-log-thing/dist/test.js:30:1)\n    at Module._compile (internal/modules/cjs/loader.js:816:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)\n    at Module.load (internal/modules/cjs/loader.js:685:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:620:12)\n    at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)\n    at internal/main/run_main_module.js:21:11\n[PANIC]\t[5/25/2019 2:07:41 PM]\tUnhandled promise rejection. Details unknown.\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folback%2Fsolid-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folback%2Fsolid-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folback%2Fsolid-log/lists"}