Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Feature: logger.Add(otherLogger) #4

Open
sauercrowd opened this issue Dec 28, 2018 · 1 comment
Open

Feature: logger.Add(otherLogger) #4

sauercrowd opened this issue Dec 28, 2018 · 1 comment
Assignees

Comments

@sauercrowd
Copy link

sauercrowd commented Dec 28, 2018

Hi!

I really like the simplicity of your library. A small thought/idea:

It might be helpful if it is possible to add a logger to another one, to only use one logging statement to write to both targets, i.e.:

logger1 = gologger.GetLogger(gologger.CONSOLE, gologger.SimpleLog)
logger1.Add(gologger.GetLogger(gologger.FILE, "filelog.log"))

logger1.log("Hello Console") // logs into console and file.

Just wanted to put this up for discussion, would love to hear your opinion on this!

@sauercrowd sauercrowd changed the title Idea: logger.Add(otherLogger) Feature: logger.Add(otherLogger) Dec 28, 2018
@sadlil
Copy link
Owner

sadlil commented Jan 7, 2019

Hi @sauercrowd Sorry for my late reply, This lib was designed on purpose for learning go with the simplest apis possible. There are a lot of good go logging library available like zap, glog. I don't think i would like to maintain this library any more unless i come up with some really good and production ready feature updates. Meanwhile also need some free time despite of being a new Dad 💘.

I really like your idea of logger.Add. If you want to have this features feel free to send a PR i would definitely like to merge.

@sadlil sadlil self-assigned this Jan 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants