Coder Social home page Coder Social logo

app-sysadmin-log-simple's People

Contributors

djzort avatar doherty avatar

Stargazers

 avatar

Watchers

 avatar  avatar

app-sysadmin-log-simple's Issues

logdir needs to have more permissive chmod

Right now, you'll probably install this as root, so your logdir will be owned by root, and unwritable by anyone else.

We should probably make it chgrp -R admin $logdir && chmod -R g+rw $logdir.

Test failures (because of SUDO_USER?)

On some of my smoker systems I see the following failure:

#   Failed test 'No tests run for subtest "log"'
#   at t/03-log.t line 27.
Can't chown('1001', '1001', '/var/tmp/cpansmoker-1023/2017010918/ZTfqUu4aQZ/2011/2/20.log'): Operation not permitted at /tmpfs/.cpan-build-cpansand/2017010918/App-Sysadmin-Log-Simple-0.009-7/blib/lib/App/Sysadmin/Log/Simple/File.pm line 84
# Looks like your test exited with 255 just after 2.
t/03-log.t ...... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 3/4 subtests 
...

The tests are running as an unpriviled user, and sudo was used to switch to this user (sudo su $OTHER_USER), so SUDO_USER is set here. Of course the unprivileged user has no rights to run chown.

On naming

I just saw GumbyPAN announce a new upload of this, and immediately I was a bit baffled by your choice of name. 'App::Sysadmin' doesn't really communicate anything. It's rather generic and has little meaning on its own. Perhaps drop the Sysadmin bit?

Additionally, placing a program called 'log' in bin/ is not the best idea. You may clobber an existing system tool (thankfully you didn't choose logger which definitely does exist). I know you're going for short and concise, but you must also take care not to collide with existing system utilities. If you'd like, we can talk about naming stuff a bit at YAPC.

Handle case where file to be viewed doesn't exist

Currently we just die:

$ log --view
Can't utf8_open($fh, '<', '/home/mike/sysadmin-log/2011/2/8.log'): No such file or directory at /usr/local/share/perl/5.10.1/App/Sysadmin/Log/Simple.pm line 45

Publish to Twitter

Might be time to re-think how we do external notification too... a proper plugin architecture might be worth having.

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.