Giter VIP home page Giter VIP logo

flogger's Introduction

Flogger

Quick and easy to use logging library for Modern Fortran applications

Features

  • Fast and lightweight logging library
  • Text highlighting
  • Log filtering
  • Save logs to logfile

Snippets / Examples

    type(FloggerUnit) :: flogs = FloggerUnit("levelClassificationTest")
    call flogs%debug("Message Test Debug 1")
    call flogs%info("Message Test Info 1")
    call flogs%notice("Message Test Notice 1")
    call flogs%warning("Message Test Warning 1")
    call flogs%error("Message Test Error 1")
    call flogs%fatal("Message Test Fatal 1")

snippets results

Getting Started

  1. USE the flogger module

    for every program scope, you need to USE the flogger module with this following command

    USE Flogger
  2. Initiate the FloggerUnit with identifier

    You can initialize multiple instances of FloggerUnit and give different labels for each unit. Here's how to initiate the FloggerUnit object

    type(FloggerUnit) :: flogMain = FloggerUnit("ClassMainTest")
    type(FloggerUnit) :: flogMidDebug = FloggerUnit("MiddleDebug")
    type(FloggerUnit) :: flogMidWarning = FloggerUnit("MiddleWarning")
  3. call the logging subroutines

    To make the log message you need to call the object methods from the corresponding FloggerUnit instances as follows.

    call flogs%debug("Message Test Debug 2")
    call flogs%notice("Message Test Notice 2")
    call flogMidWarning%warning("Message Test Warning 4")
    call flogMidWarning%error("Message Test Error 4")
    call flogMidDebug%fatal("Message Test Fatal 4")
    call flogMidDebug%info("Message Test Info 2")
  4. Set flogger options

    Flogger logging behavior can be changed using SET_FLOGGER_OPTIONS subroutine. Here is the example

    call SET_FLOGGER_OPTIONS(Level=FLOGS_SET_RELEASE)   ! set to release mode
    call SET_FLOGGER_OPTIONS(Level=FLOGS_SET_SILENT)    ! set to silent mode
    call SET_FLOGGER_OPTIONS(FileOutput=.true.)         ! make flogger build logfiles

Documentations

under development...

Author

Arif Y. Sunanhadikusuma (Soen)
---
LinkedIn
Civil Engineering (S.T.)
Department of Civil Engineering
Parahyangan Catholic University, Indonesia
---
Geotechnical Engineering (M.Sc)
Civiel Techniek en Geowetenschappen (CiTG)
TU Delft, The Netherlands

flogger's People

Contributors

arifyunando avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rbarrel

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.