Code Monkey home page Code Monkey logo

go-logger's People

Contributors

adelq avatar apsdehal avatar gjvnq avatar inaneverb avatar kanshiroron avatar maezen avatar parkervcp 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  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

go-logger's Issues

Add level filter

Hello,

Thank you the library.
Please consider to add filter level, to allow show only relevant levels.

%{time} formatting not working

The format option %{time} does not work without format description as you can see in this MWE:

package main
import (
    "os"
    "github.com/apsdehal/go-logger"
)
func main() {
    log, err := logger.New("test", 1, os.Stdout)
	if err != nil {
		panic(err) // Check for error
	}
    log.SetFormat("%{time} [%{level}] %{message}")
    log.Debug("not working test")
    log.SetFormat("%{time:2006-01-02 15:04:05} [%{level}] %{message}")
    log.Debug("working test")
}

output is

 [DEBUG] not working test
2018-07-04 00:52:12 [DEBUG] working test

Windows color

Using this file:

package main
import "github.com/apsdehal/go-logger"
func main () {
   aa, _ := logger.New(1, 1)
   aa.Warning("bbbbb")
}

I get this result:

[33m#1 2019-06-14 06:39:31 log.go:8 ▶ WAR bbbbb [0m

Looks like there is typo in the example code in README.md

	// Use log levels to set your log priority
	log2.SetLogLevel(DebugLevel)

Since this code is not in the logger package, it doesn't have access to DebugLevel. Use this instead:

	// Use log levels to set your log priority
	log2.SetLogLevel(logger.DebugLevel)

Same for the WarningLevel 3 lines down.

logger line

hi,

#1 2018-01-18 00:07:37 log.go:25 ▶ WAR TransactionID=opcli InstancesID=main Message=This is test []

it seems the line is not correct,the line should be the line the number when i use log.DebugF 、log.WarningF .. and so on ?

Understanding the outcomes of Google Summer of Code

Dear Amanpreet Singh,

I am a Ph.D. student at the University of São Paulo (Brazil). We would like to understand how and how much Open Source Communities benefit from participating in Google Summer of Code (GSoC). We believe that your experience in GSoC is valuable and could help us achieve that. In a 1-minute questionnaire, we would like to know:

Concerning the project entitled "Annotation Tool that extracts information and feed them on Wikidata" developed in GSoC 2014.

  1. Do you have a GitHub repository for the GSoC project? If so, could you provide us with the link to the project?

  2. Have you continued committing code or opening issues to the GSoC project after GSoC? (Yes / No) If so, code, issues or both?

  3. Have you continued committing code or opening issues to other OSS projects after GSoC? (Yes / No) If so, code, issues or both?

  4. Could we use aggregate data from your participation in GSoC and other OSS projects in our research?

The following link contains a sample of our work and how we would use your data:
https://ieeexplore.ieee.org/document/8094410/

Regards,

Jefferson

Use lowercase f in formatting function names

Your project looks really nice!

When reading the examples, I propose to streamline function names to correspond to the naming scheme of fmt, log and testing: fmt.Printf(), log.Printf(), t.Errorf() are all using lowercase f, whereas your package uses WarningF() DebugF() with capital Fs.

Proposal: Use lowercase f in your package as well, e.g. Warningf()

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.