rotating-log 0.4 → 0.4.1
raw patch · 5 files changed
+65/−11 lines, 5 filesdep +old-localedep +time-locale-compatnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependencies added: old-locale, time-locale-compat
API changes (from Hackage documentation)
Files
- LICENSE +28/−1
- README.md +18/−0
- changelog.md +2/−0
- rotating-log.cabal +15/−9
- src/System/RotatingLog.hs +2/−1
LICENSE view
@@ -1,3 +1,30 @@-Copyright (c)2013, Soostone Inc+Copyright (c) 2016, Soostone Inc All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Ozgun Ataman nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.md view
@@ -0,0 +1,18 @@+# rotating-log [](https://travis-ci.org/Soostone/rotating-log)++## Description++A simple package to facilitate easy logging into size-limited,+automatically rotating files.++## Features++- Pragmatic, practical+- Minimal dependencies+- Implicit handling of log rotation+- Thread-safe and therefore concurrency-friendly+- Battle-tested in high volue production++## Contributing++Bug-reports, feature suggestions, patches are all welcome.
+ changelog.md view
@@ -0,0 +1,2 @@+0.4.1+* Fixed incorrect license file. rotating-log is BSD-3.
rotating-log.cabal view
@@ -1,5 +1,5 @@ name: rotating-log-version: 0.4+version: 0.4.1 description: Size-limited, concurrent, automatically-rotating log writer. Synopsis: Size-limited, concurrent, automatically-rotating log writer. license: BSD3@@ -12,31 +12,37 @@ cabal-version: >= 1.8 homepage: http://github.com/Soostone/rotating-log +extra-source-files:+ README.md+ changelog.md+ library hs-source-dirs: src - exposed-modules: + exposed-modules: System.RotatingLog - build-depends: + build-depends: base >= 4 && < 5, bytestring >= 0.8, time >= 1.5 && < 1.7,+ old-locale >= 1.0,+ time-locale-compat, filepath >= 1.0, directory >= 1.0- + ghc-options: -Wall -fwarn-tabs test-suite test-rotate- type: exitcode-stdio-1.0 + type: exitcode-stdio-1.0 main-is: TestRotate.hs ghc-options: -Wall hs-source-dirs: test, src build-depends:- base, + base, bytestring,- time, - filepath, - directory + time,+ filepath,+ directory ghc-options: -Wall -fwarn-tabs -threaded
src/System/RotatingLog.hs view
@@ -32,6 +32,7 @@ import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B import Data.Time+import qualified Data.Time.Locale.Compat as LC import Data.Word import System.Directory import System.FilePath.Posix@@ -63,7 +64,7 @@ logFileName :: String -> UTCTime -> FilePath logFileName pre t = concat- [pre, "_", formatTime defaultTimeLocale "%Y_%m_%d_%H_%M_%S%Q" t, ".log"]+ [pre, "_", formatTime LC.defaultTimeLocale "%Y_%m_%d_%H_%M_%S%Q" t, ".log"] ------------------------------------------------------------------------------