Commit a09576fb authored by Christian Beer's avatar Christian Beer
Browse files

LIB: introduce new warning message level

This is to be used for non critical, non normal messages that don't break anything but need to be investigated by project admins.
Needed in the file_upload_handler to find hosts that reupload result files and investigate the reason.
parent bff1cafe
......@@ -24,6 +24,7 @@ SCHED_MSG_LOG log_messages;
const char* SCHED_MSG_LOG::v_format_kind(int kind) const {
switch(kind) {
case MSG_CRITICAL: return "[CRITICAL]";
case MSG_WARNING: return "[warning]";
case MSG_NORMAL: return "";
case MSG_DEBUG: return "[debug]";
default: return "*** internal error: invalid MessageKind ***";
......
......@@ -24,14 +24,14 @@
#include "boinc_fcgi.h"
#endif
enum { MSG_CRITICAL=1, MSG_NORMAL, MSG_DEBUG };
enum { MSG_CRITICAL=1, MSG_WARNING, MSG_NORMAL, MSG_DEBUG };
class SCHED_MSG_LOG : public MSG_LOG {
const char* v_format_kind(int kind) const;
bool v_message_wanted(int kind) const;
public:
int debug_level;
enum { MSG_CRITICAL=1, MSG_NORMAL, MSG_DEBUG };
enum { MSG_CRITICAL=1, MSG_WARNING, MSG_NORMAL, MSG_DEBUG };
SCHED_MSG_LOG(): MSG_LOG(stderr) { debug_level = MSG_NORMAL; }
void set_debug_level(int new_level) { debug_level = new_level; }
void set_indent_level(const int new_indent_level);
......
......@@ -164,7 +164,7 @@ int copy_socket_to_file(FILE* in, char* path, double offset, double nbytes) {
// and made read-only;
// return success to the client won't keep trying
//
log_messages.printf(MSG_CRITICAL,
log_messages.printf(MSG_WARNING,
"client tried to reupload the read-only file %s\n",
path
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment