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

Where is get_set_log_detalisation_level() defined? #1588

Closed
moneroexamples opened this issue Jan 16, 2017 · 8 comments
Closed

Where is get_set_log_detalisation_level() defined? #1588

moneroexamples opened this issue Jan 16, 2017 · 8 comments

Comments

@moneroexamples
Copy link
Contributor

moneroexamples commented Jan 16, 2017

I see it used in many places, but cant find a file with its declaration or definition. Similarly, where are log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL); and LOGGER_CONSOLE defiled?

Searching the source code shows their use only. Is it boost or some other external library that monero is using that has these functions and constants?

@ghost
Copy link

ghost commented Jan 16, 2017

Have a look at PR #1522 where @moneromooo-monero has changed the entire logging system to easylogging++

Reading through the code should hopefully provide the answers you're after

@moneromooo-monero
Copy link
Collaborator

Not sure where they're defiled, but that sounds kinky.

contrib/epee/include/misc_log_ex.h (before the logging change - after it, they don't exist anymore)

@moneroexamples
Copy link
Contributor Author

moneroexamples commented Jan 16, 2017

@moneromooo-monero

Yes, cant find them anywhere, but monero compiles without issues. There must be defined somewhere. I need to find where, as none of the moneroexamples compiles now because there are undefined. Including easylogging++.h does not help, so they are not there.

@ghost
Copy link

ghost commented Jan 16, 2017

I think you'll need to look at the changes in that PR to see how the new macros function etc rather than just a simple #include

@moneroexamples
Copy link
Contributor Author

@NanoAkron @moneromooo-monero

I see what happened now. The loggin system was changed, but some files remianed in monero codebase that use the old logging system:

https://github.com/monero-project/monero/search?utf8=%E2%9C%93&q=get_set_log_detalisation_level

Seems those files are not used anywhere, as monero compiles even though they used undefined methods and variables?

@moneromooo-monero
Copy link
Collaborator

You want to replace it with: mlog_configure("name_of_your_program.log", true_to_output_console_as_well);

@ghost
Copy link

ghost commented Jan 17, 2017

@moneroexamples that's an interesting find. Would you care to strip out the components you've found which are now redundant and submit that change as a PR?

@moneroexamples
Copy link
Contributor Author

@moneromooo-monero

Thanks.

@NanoAkron

Yes, I can remove the files, and make PR to romove those files later today.

Thanks for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants