adobe / adobe/aio-lib-core-logging

winston log provider: add ability to modify config for showing/hiding timestamp

Open
#54 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
3
Forks
8
PR merge metrics
No merged PRs in 30d

Description

If you choose the `winston` log provider, it adds a timestamp by default. Add an option in the config to not show the timestamp, and also the ability to turn on/off timestamp after initialization.

## Proposed

```javascript
// init winston logger (timestamp is true by default for backwards compat)
const aioLogger = require('@adobe/aio-lib-core-logging')('App', {provider:'winston', timestamp: false })
// turn on the timestamp later
aioLogger.config.timestamp = true // use a setter
```

Contributor guide

Open the contributing guide

Research direction

Start at the winston provider initialization and the logger config handling described in the issue. Check the existing tests for logger configuration; done means timestamp is enabled by default, can be disabled through initialization, and can be toggled after initialization through config.timestamp.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.