Giter VIP home page Giter VIP logo

journald's People

Contributors

johnnybubonic avatar pamburus avatar ssgreg 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

Watchers

 avatar  avatar  avatar

journald's Issues

Support "unit" name via jounrnalctl and controlling name in journal logs?

Hi,

Is it possible to use the "journal -u test" to get only messages from "test" unit.

I tried this ( i tried adding the WithName but this doesn't seem to do anything in my case)

	// Create Logger with ChannelWriter.
	logger := logf.NewLogger(logf.LevelInfo, writer).WithName("test")

	logger.Info("IAN got cpu info", logf.Int("count", runtime.NumCPU()))

but it didn't work.

If I look in the logs, it is there but I can't specify the unit.

Here is the example of the log

Oct 19 13:08:11 kube01 testme.go.gorun[253735]: IAN got cpu info

Another thing that I am not sure if it's possible to control, but you notice the "testme.go.gorun", is it possible to control that ?

I am using gorun with a go file.. my go file is called testme.go and obviously running the "gorun".

I was wondering if we can just replace this with something custom i.e "test"

Any help really appreciated

Thanks in advance

Fedora 33: test failed (v1.0.0)

+ cd journald-1.0.0
+ LDFLAGS=' -X github.com/ssgreg/journald/version=1.0.0'
+ GO_TEST_FLAGS='-buildmode pie -compiler gc'
+ GO_TEST_EXT_LD_FLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  '
+ go-rpm-integration check -i github.com/ssgreg/journald -b /home/safarov/rpmbuild/BUILD/journald-1.0.0/_build/bin -s /home/safarov/rpmbuild/BUILD/journald-1.0.0/_build -V 1.0.0-1.fc33 -p /home/safarov/rpmbuild/BUILDROOT/golang-github-ssgreg-journald-1.0.0-1.fc33.x86_64 -g /usr/share/gocode -r '.*example.*'
Testing    in: /home/safarov/rpmbuild/BUILD/journald-1.0.0/_build/src
         PATH: /home/safarov/rpmbuild/BUILD/journald-1.0.0/_build/bin:/home/safarov/.local/bin:/home/safarov/bin:/home/safarov/.local/bin:/home/safarov/bin:/home/safarov/.local/bin:/home/safarov/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
       GOPATH: /home/safarov/rpmbuild/BUILD/journald-1.0.0/_build:/usr/share/gocode:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags " -X github.com/ssgreg/journald/version=1.0.0 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  '"
      testing: github.com/ssgreg/journald
github.com/ssgreg/journald


--- FAIL: TestCheckSmallMessage (5.13s)
    send_test.go:79: 
        	Error Trace:	send_test.go:79
        	Error:      	Received unexpected error:
        	            	exit status 1
        	Test:       	TestCheckSmallMessage

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.