Permalink
Commits on Jan 30, 2017
  1. Remove racy test

    pkorotkov committed Jan 30, 2017
  2. Merge pull request #140 from lwithers/CachedCallerInfo

    pkorotkov committed on GitHub Jan 30, 2017
    Cache caller info
  3. Merge pull request #141 from lwithers/FileModeAppend

    pkorotkov committed on GitHub Jan 30, 2017
    Always open log files with O_APPEND
Commits on Jan 10, 2017
  1. Merge pull request #144 from lwithers/RollingLock

    pkorotkov committed on GitHub Jan 10, 2017
    Rolling log file writer: avoid truncating file when rotating
Commits on Jan 9, 2017
  1. Rolling log file writer: avoid truncating file when rotating

    Laurence Withers committed Jan 9, 2017
    There are several conditions under which the rotating log file writer
    can actually truncate the file it is rotating.
    
    Principally, this is caused by a lack of locking when writing to the log
    file. In rollingFileWriter.Write(), we test for whether the current file
    needs to be rotated, and if so then perform the rotation. This needs
    locking to ensure that we do not have two (or more) goroutines making
    the decision to rotate, then rotating. If this occurs then the second
    rotation of an empty or virtually-empty file will truncate the original
    file's contents. This commit resolves the problem by adding mutex
    locking to Write().
    
    There is also a more convoluted path through the time-based file writer
    code which (previously) checked the modification time of the file on
    disk, meaning that a mutex in the Write() routine alone is not
    sufficient.  This commit also changes the time-based tests to cache the
    time and filename, removing the need for a call to os.Stat() and
    removing the possibility of making an inconsistent decision to roll more
    than once.
    
    Fixes #143.
Commits on Jan 1, 2017
  1. Always open log files with O_APPEND

    Laurence Withers committed Jan 1, 2017
    In order to avoid any sort of race condition, always open log files with
    O_APPEND. This resolves problems observed where old content in a log
    file is being overwritten by a running process.
Commits on Dec 30, 2016
  1. Cache caller info

    Laurence Withers committed Dec 30, 2016
    By introducing a cache of caller PC (program counter) to logContext, we
    can avoid calling runtime.FuncForPC for each log message. This function
    in the runtime package performs a linear search over each function
    linked in to the executable, and is thus slow.
Commits on Oct 9, 2016
  1. Merge pull request #129 from jonsyu1/feature/dont-buffer-logs-in-memory

    goodsign committed on GitHub Oct 9, 2016
    Avoid buffering logs in memory
Commits on Oct 1, 2016
  1. Avoid buffering logs in memory

    jonsyu1 committed Oct 1, 2016
    Instead of buffering all logs into memory before writing them to the archive,
    stream directly from source to destination when the archive/compression format
    matches. Otherwise, we stream to a temporary file on disk in order to compute
    headers and then stream to the destination.
Commits on Jun 20, 2016
  1. Merge pull request #121 from jonsyu1/master

    goodsign committed on GitHub Jun 20, 2016
    Handle error opening file
Commits on Jun 19, 2016
  1. Handle error opening file

    jonsyu1 committed Jun 19, 2016
    Rolling file writer fails to handle error opening file. This would lead to
    "invalid argument" error writing to the nil *os.File.
Commits on Jun 1, 2016
Commits on May 24, 2016
  1. Merge pull request #117 from jonsyu1/jyu/rolling-file-by-date-origina…

    goodsign committed May 24, 2016
    …l-file
    
    Rolling file by date writes to original file
Commits on May 20, 2016
  1. Merge pull request #1 from jonsyu1/jyu/rolling-file-by-date-original-…

    jonsyu1 committed May 20, 2016
    …file
    
    Rolling file by date writes to original file
  2. Rolling file by date writes to original file

    jonsyu1 committed May 19, 2016
    This adds a .seelog_rolling_tracker to track the timestamp of the last log roll.
Commits on May 19, 2016
  1. Merge pull request #116 from jonsyu1/master

    goodsign committed May 19, 2016
    Logger clone helper
  2. Logger clone helper

    jonsyu1 committed May 19, 2016
    See #94
Commits on Apr 20, 2016
  1. Merge pull request #113 from mlallaouret/feature/add_gzip_compression…

    goodsign committed Apr 20, 2016
    …_format
    
    Add gzip compression format
Commits on Apr 18, 2016
  1. resolve cihub/seelog#112 : Add gzip compression

    mlallaouret committed Apr 8, 2016
    Gzip compression format does not directly support compression of multiple files.
    When dealing with multiple files, it is required to first collect them into one archive, usually with `tar`, and then compress the result with `gzip`.
    
    The new compression format can be selected with `archivetype="gzip"` option. When combined to `archiveexploded="true"`, the log files will be directly and individually archived with `gzip`.
    Otherwise, the log files will be collected using `tar` and then compressed using `gzip`.
Commits on Apr 8, 2016
Commits on Apr 7, 2016
  1. Merge pull request #111 from ylegat/feature/exploded-zip-rolling-type

    goodsign committed Apr 7, 2016
    Resolve cihub/seelog#110 : explode archived logs
  2. resolve cihub/seelog#110 : explode archived logs.

    ylegat committed Apr 5, 2016
    **Why ?**
    Popular command line utilities like `zcat` or `zgrep` are useful tools for processing log files. For instance, `zgrep` allow to search compressed files for a regular expression.
    Those tools require that the analyzed archive contains only one file. Yet, when compressing archived logs, seelog put all the log files in the same archive.
    
    So, The purpose of this pull request is to add the possibility for archived logs to be zipped in dedicated zip files.
    
    **How ?**
    As new compression formats might be introduced in future release of `seelog`, we want to clearly separate the choice of the compression algorithm to the choice of the gathering mode (grouped vs exploded).
    Therefore, we propose a new attribute, `archiveexploded` (a boolean), specifying if the logs should be exploded or grouped inside the same archive file.
Commits on Apr 5, 2016
  1. Fix XML syntax error with go1.6

    ylegat committed Apr 5, 2016
Commits on Mar 26, 2016
  1. Merge pull request #108 from eyasuyuki/master

    goodsign committed Mar 26, 2016
    add %r for windos
Commits on Mar 25, 2016
  1. add %r for windos

    eyasuyuki committed Mar 25, 2016
Commits on Dec 16, 2015
  1. Update README.markdown

    goodsign committed Dec 16, 2015
  2. Exported CfgParseParams.

    goodsign committed Dec 16, 2015
Commits on Nov 2, 2015
  1. Issue #96.

    goodsign committed Nov 2, 2015
Commits on Sep 30, 2015
  1. Issue #95.

    goodsign committed Sep 30, 2015
  2. Issue #93.

    goodsign committed Sep 30, 2015