Git Product home page Git Product logo

loga's Introduction

Loga

Loga

WIP

A logging library for OCaml.

HOW TO INSTALL

opam install loga

How to use

Add a loga and loga.ppx to your dune file.

Example:

(libraries loga)
(preprocess (pps loga.ppx)

Then you can use logger like below!

let () =
    [%loga.info "Hello %s %d" "world" 42];

How to develop

Build

git clone [email protected]:yutopp/loga.git
cd loga
opam pin add loga . --strict

Run tests

dune runtest

loga's People

Contributors

amutake avatar kit-ty-kate avatar yutopp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

amutake

loga's Issues

Support dune

How can I use loga in my dune project? I tried with:

  • src/main.ml
let () =
  [%Loga.info "=== start main ==="];
  ()
  • src/dune
(executables
 (names main)
 (libraries loga)
 (preprocess (pps loga)))

and I got:

File "src/dune", line 4, characters 13-23:
4 |  (preprocess (pps loga)))
                 ^^^^^^^^^^
Error: No ppx driver were found. It seems that loga is not compatible with
Dune. Examples of ppx rewriters that are compatible with Dune are ones using
ocaml-migrate-parsetree, ppxlib or ppx_driver.

my environment

  • ocaml version 4.07.0
  • opam 2.0.0
  • dune 1.2.1
  • loga version 0.0.2 (by opam)

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.