Skip to content

Ray uses spdlog instead of glog #10493

@ashione

Description

@ashione

I have talked with @rkooo567 in slack link https://ray-distributed.slack.com/archives/C016MPZE1L1/p1598937145003600.
Reasons:

  • glog lacks features such as log rotation or custom formatting. Log rotation is critical function of long running job becase the disk will become full due to a large number of log files being written without daily or custom rotation configuration.

  • glog only supports writing files to different sinks for different severity.

Solution:
Replace glog with spdlog. This is homepage in github https://github.com/gabime/spdlog
Its simple description:

Very fast (see benchmarks below).
Headers only or compiled
Feature rich formatting, using the excellent fmt library.
Asynchronous mode (optional)
Custom formatting.
Multi/Single threaded loggers.
Various log targets:
Rotating log files.
Daily log files.
Console logging (colors supported).
syslog.
Windows debugger (OutputDebugString(..))
Easily extendable with custom log targets (just implement a single function in the sink interface).
Log filtering - log levels can be modified in runtime as well as in compile time.
Support for loading log levels from argv or from environment var.
Backtrace support - store debug messages in a ring buffer and display later on demand.

Spdlog repo and deps will be introduced in @Basasuya PR #10419

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions