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

Expose IsGoogleLoggingInitialized() in public API. #651

Merged
merged 1 commit into from
May 14, 2021

Commits on May 14, 2021

  1. Expose IsGoogleLoggingInitialized() in public API.

    Usually library does not have control of the process lifespan.
    Without this function, it is impossible to init/shutdown reliably.
    It has been one of the major pain points for years when using glog in libraries.
    
    AFAIK 3 workarounds have been used previously:
    1. Init without checking. This causes compatiblity issues with other libs using glog.
    2. Also provide a init function in library's API. This makes API complicated and stateful, especially for libs that does not mean to stay for the entire life of process.
    3. Steal the utility function in internal namespace. Does not work with msvc (due to missing dllexport) or `gcc -fvisibility=hidden`.
    
    None of them are perfect, except for the last hack that usually works well on Linux.
    0.5.0 changes default visibility to hidden and it does not work anymore.
    
    Resolve google#125
    xkszltl committed May 14, 2021
    Configuration menu
    Copy the full SHA
    81e0d61 View commit details
    Browse the repository at this point in the history