Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ftylog::setVerboseMode() reset the Ftylog instance (logger/appenders) #34

Open
FrancoisRegisDegott-eaton opened this issue Apr 26, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@FrancoisRegisDegott-eaton
Copy link
Contributor

FrancoisRegisDegott-eaton commented Apr 26, 2020

code sample:
bool verbose; //variant
ftylog_setInstance("my_agent_name", FTY_COMMON_LOGGING_DEFAULT_CFG);
if (verbose) ftylog_setVerboseMode(ftylog_getInstance());
log_info("my info");

verbose = false, output is
2020-04-26 11:25:38 my_agent_name [INFO ] src/example.c:28 my info
verbose = true, output is
my_agent_name [140660466603840] -INFO- main (src/example.c:28) my info

other example, using bmsg command (fty-proto/blob/master/src/bmsg.c#L361)
bmsg monitor _EULA playing with -v option
see the different console logs

~$ bmsg monitor _EULA
bmsg - Command line tool to work with fty proto messages
2020-04-26 11:50:19 bmsg [TRACE] src/bmsg.c:387 command=monitor
2020-04-26 11:50:19 bmsg [TRACE] src/bmsg.c:396 address: bmsg.83904275
I: 20-04-26 11:50:19 My address is 'bmsg.83904275'
2020-04-26 11:50:19 bmsg [TRACE] src/bmsg.c:429 set consumer (_EULA, .)
^C
~$ bmsg -v monitor _EULA
bmsg - Command line tool to work with fty proto messages
bmsg [139726711945024] -TRACE- main (src/bmsg.c:387) command=monitor
bmsg [139726711945024] -TRACE- main (src/bmsg.c:396) address: bmsg.83912911
I: 20-04-26 11:50:28 My address is 'bmsg.83912911'
bmsg [139726711945024] -TRACE- main (src/bmsg.c:429) set consumer (_EULA, .
)
^C

@FrancoisRegisDegott-eaton FrancoisRegisDegott-eaton added the bug Something isn't working label Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant