Coder Social home page Coder Social logo

async-logger's Introduction

Async logger

Async logger is simple pkg to write logs to file or output to std asynchronously

Usage

Check the Makefile for more information.

Usage: make [target]

Targets:
  build                Compile binaries.
  tests                Run tests.

Configuration

Check /configs for description and some examples.

Build

To build application locally, just run:

make build

The binaries will be placed in /bin.

Docker

To build application inside a Docker container, choose the Dockerfile and run:

docker build -f ${Dockerfile} -t ${IMAGE_NAME} .

Docker Compose

To build application with Docker Compose (with required services like database and etc.), run:

docker compose -f docker-compose.yml up --build 

Testing

To run only unit tests simply run:

make test

Run app

Env

To run app you should export env CONFIG_FILE:

export CONFIG_FILE=./configs/config.yaml 

And run app with args:

./bin/alog_test 3 50

In this example we run 3 threads and write 50 messages in each thread.

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.