Sponsored Content
The Lounge What is on Your Mind? Debugging Our Computer Science Trivia Feature Post 303041046 by Neo on Tuesday 12th of November 2019 11:19:56 PM
Old 11-13-2019
Update: Turned off trivia code debug logging since all is going well at this time.
 

7 More Discussions You Might Find Interesting

1. What is on Your Mind?

Computer Science and Information Technology

Hi, I haven't posted on the forums for a while now, I tried to find the most appropriate section for this post, but if this is in the wrong section please forgive me. First, let me say I'm a sophomore in HS. I know that job wise I definitely want to do something in computers. A while ago I was... (5 Replies)
Discussion started by: hpicracing
5 Replies

2. Programming

Is Web Development is a part of computer science ?

I am now a student in university in 2nd year. I am studying computer science. But I am not sure what type of jobs computer science provide. I know some of them are software programming or network management. Recently, I hear some about Web Development. I wonder if it is a part of computer science.... (1 Reply)
Discussion started by: Anna Hussie
1 Replies

3. Web Development

Is Web Development is a part of computer science ?

I am now a student in university in 2nd year. I am studying computer science. But I am not sure what type of jobs computer science provide. I know some of them are software programming or network management. Recently, I hear some about Web Development. I wonder if it is a part of computer... (3 Replies)
Discussion started by: Anna Hussie
3 Replies

4. What is on Your Mind?

Forum Trivial Pursuit - New Computer Science and Mathematics Trivia for UNIX.com

I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box. In the future, I plan to Expand this feature to add more trivia categories from math, science and technology. Keep track of correct and... (20 Replies)
Discussion started by: Neo
20 Replies

5. What is on Your Mind?

1000+ Computer Science Trivia Questions at UNIX.COM

The UNIX and Linux Forums now has over 1000 TRUE / FALSE computer science and computer related trivia question in our database. These questions are of relatively high quality (compared to similar sites on the web) and are fun (according to feedback by users). In the first week during the... (1 Reply)
Discussion started by: Neo
1 Replies

6. What is on Your Mind?

New Member and Country Computer Trivia Leaderboards

Thanks to Akshay, who helped me write the core MySQL queries, we now have two new draft leaderboards, by (1) member and by (2) country: https://www.unix.com/trivia_stats.php Currently milhan leads the members with a high score of 90%: ... (3 Replies)
Discussion started by: Neo
3 Replies

7. What is on Your Mind?

Computer Trivia Feature Tops 50,000 Questions Answered

Just noticed that our successful computer trivia feature (stats here) has surpassed over 50,000 questions answered by users: https://www.unix.com/trivia_stats.php This was a coding effort worth while and I'm pleased to see so many people enjoying it in such a short time since it was released... (3 Replies)
Discussion started by: Neo
3 Replies
Net::Daemon::Log(3)                                     User Contributed Perl Documentation                                    Net::Daemon::Log(3)

NAME
Net::Daemon::Log - Utility functions for logging SYNOPSIS
# Choose logging method: syslog or Win32::EventLog $self->{'facility'} = 'mail'; # Default: Daemon $self->{'logfile'} = undef; # Default # Choose logging method: stderr $self->{'logfile'} = 1; # Choose logging method: IO handle my $file = IO::File->new("my.log", "a"); $self->{'logfile'} = $file; # Debugging messages (equivalent): $self->Log('debug', "This is a debugging message"); $self->Debug("This is a debugging message"); # Error messages (equivalent): $self->Log('err', "This is an error message"); $self->Error("This is an error message"); # Fatal error messages (implies 'die') $self->Fatal("This is a fatal error message"); WARNING
THIS IS ALPHA SOFTWARE. It is *only* 'Alpha' because the interface (API) is not finalised. The Alpha status does not reflect code quality or stability. DESCRIPTION
Net::Daemon::Log is a utility class for portable logging messages. By default it uses syslog (Unix) or Win32::EventLog (Windows), but logging messages can also be redirected to stderr or a log file. Generic Logging $self->Log($level, $msg, @args); This is the generic interface. The logging level is in syslog style, thus one of the words 'debug', 'info', 'notice', 'err' or 'crit'. You'll rarely need info and notice and I can hardly imagine a reason for crit (critical). In 95% of all cases debug and err will be sufficient. The logging string $msg is a format string similar to printf. Utility methods $self->Debug($msg, @args); $self->Error($msg, @args); $self->Fatal($msg, @args); These are replacements for logging with levels debug and err. The difference between the latter two is that Fatal includes throwing a Perl exception. Chossing a logging target By default logging will happen to syslog (Unix) or EventLog (Windows). However you may choose logging to stderr by setting $self->{'logfile'} = 1; This is required if neither of syslog and EventLog is available. An alternative option is setting $self->{'logfile'} = $handle; where $handle is any object supporting a print method, for example an IO::Handle object. Usually the logging target is choosen as soon as you call $self->Log() the first time. However, you may force choosing the target by doing a $self->OpenLog(); before calling Log the first time. MULTITHREADING
The Multithreading capabitities of this class are depending heavily on the underlying classes Sys::Syslog, Win32::EventLog or IO::Handle. If they are thread safe, you can well assume that this package is too. (The exception being that you should better call $self->OpenLog() before threading.) AUTHOR AND COPYRIGHT
Net::Daemon is Copyright (C) 1998, Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Phone: +49 7123 14887 Email: joe@ispsoft.de All rights reserved. You may distribute this package under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO
Net::Daemon(3), Sys::Syslog(3), Win32::EventLog(3), IO::Handle(3) perl v5.12.1 2007-05-23 Net::Daemon::Log(3)
All times are GMT -4. The time now is 10:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy