Giter Site home page Giter Site logo

haskell-logger's People

Contributors

aghitza avatar finlay avatar marcelbuesing avatar orthographic-pedant avatar pmlodawski avatar sboosali avatar wdanilo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haskell-logger's Issues

Remove dependencies of base<4.8

Cant use it with my projects as it always gives me cabal hell due to base<4.8 like dependencies present in the .cabal file!
Can it always have a lower limit but no upper limit.

logger doesn't compile

I created a new project via stack new stacktest, added logger as a extra-dep in stack.yml, added logger as a dependency in the cabal file, and tried to build. Didn't work, got this error:

~/s/stacktest ❯❯❯ stack build                       Sun Mar 27 12:54:21 PDT 2016
logger-0.1.0.2: configure
logger-0.1.0.2: build
Progress: 1/2
--  While building package logger-0.1.0.2 using:
      /home/scott/.stack/setup-exe-cache/x86_64-openbsd/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-openbsd/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/scott/src/stacktest/.stack-work/logs/logger-0.1.0.2.log

    Configuring logger-0.1.0.2...
    Building logger-0.1.0.2...
    Preprocessing library logger-0.1.0.2...

    /tmp/stack1963/logger-0.1.0.2/src/System/Log/Filter.hs:3:14: Warning:
        -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS

    /tmp/stack1963/logger-0.1.0.2/src/System/Log/Format.hs:3:14: Warning:
        -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS

    /tmp/stack1963/logger-0.1.0.2/src/System/Log/Data.hs:8:14: Warning:
        -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
    [ 1 of 15] Compiling System.Log.Log   ( src/System/Log/Log.hs, .stack-work/dist/x86_64-openbsd/Cabal-1.22.5.0/build/System/Log/Log.o )
    [ 2 of 15] Compiling System.Log.Data  ( src/System/Log/Data.hs, .stack-work/dist/x86_64-openbsd/Cabal-1.22.5.0/build/System/Log/Data.o )
    ghc: /home/scott/.stack/snapshots/x86_64-openbsd/lts-5.9/7.10.3/lib/x86_64-openbsd-ghc-7.10.3/atomic-primops-0.8.0.3-KJ263HDUG22HNNccH10Gth/HSatomic-primops-0.8.0.3-KJ263HDUG22HNNccH10Gth.o: unknown symbol `store_load_barrier'
    ghc: unable to load package `atomic-primops-0.8.0.3'
~/s/stacktest ❯❯❯              

Use Data.Text instead of String

Would you consider changing all Strings into Data.Texts ?
The only issue I foresee is about the pretty-print library:

  • ansi-wl-pprint supports ANSI colors but doesn't support Text;
  • wl-pprint-text supports Text but doesn't support ANSI colors;
  • there is no ansi-wl-pprint-text at the moment...

I can submit a pull request if you don't have time to implement it, provided you tell me what you'd rather do regarding the above issue.

ThreadedLogger from README breaks output

When I run ThreadedLogger from README it breaks output

code:

import           System.Log.Simple
import qualified System.Log.Logger.Thread as Thread
import           Control.Monad.IO.Class (liftIO)


test = do
    addHandler $ printHandler Nothing
    debug "a debug"
    setPriority Debug
    debug "another debug"
    warning "a warning"
    Thread.fork $ do
        liftIO $ print "Threaded print"
        debug "debug in fork"
    liftIO $ print "End of the test!"

main = print =<< ( runBaseLoggerT (Lvl, Msg) 
          . runHandlerLoggerT defaultFormatter 
          . runPriorityLoggerT Warning 
          . runThreadedLogger
          ) test

sample output:

"T[hrDeeabduegd ]p riannto"t
her "dEenbdu gof
 t�h[e9 3tmes[t!W"a
rning] �[0ma warning
[Debug] debug in fork
()

Example from README using time does not compile

When I try to run a code provided in README

    main = print =<< runBaseLogger (Lvl, Msg, Time) test

I get an error

Couldn't match type ‘[Char]’ with ‘IO a0’
Expected type: BaseLoggerT
                 (System.Log.Tuples.MapRTuple
                    Data (System.Log.Tuples.Tuple2RTuple (Lvl, Msg, Time)))
                 Data.Functor.Identity.Identity
                 (IO a0)
  Actual type: BaseLoggerT
                 (Data Lvl, (Data Msg, (Data Time, ())))
                 Data.Functor.Identity.Identity
                 [Char]
In the second argument of ‘runBaseLogger’, namely ‘test’
In the second argument of ‘(=<<)’, namely
  ‘runBaseLogger (Lvl, Msg, Time) test’

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.