Changeset 2393 for box/trunk/bin/bbackupquery/bbackupquery.cpp
- Timestamp:
- 30/11/2008 22:25:27 (3 years ago)
- File:
-
- 1 edited
-
box/trunk/bin/bbackupquery/bbackupquery.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/bin/bbackupquery/bbackupquery.cpp
r2285 r2393 63 63 "[-u] " 64 64 #endif 65 "\n\t[-c config_file] [-l log_file] [commands]\n" 65 "\n" 66 "\t[-c config_file] [-o log_file] [-O log_file_level]\n" 67 "\t[-l protocol_log_file] [commands]\n" 68 "\n" 66 69 "As many commands as you require.\n" 67 70 "If commands are multiple words, remember to enclose the command in quotes.\n" 68 "Remember to use quit command if you don't want to drop intointeractive mode.\n");71 "Remember to use the quit command unless you want to end up in interactive mode.\n"); 69 72 exit(1); 70 73 } … … 119 122 120 123 #ifdef WIN32 121 const char* validOpts = "qvwuc:l: W:";124 const char* validOpts = "qvwuc:l:o:O:W:"; 122 125 bool unicodeConsole = false; 123 126 #else 124 const char* validOpts = "qvwc:l:W:"; 125 #endif 127 const char* validOpts = "qvwc:l:o:O:W:"; 128 #endif 129 130 std::string fileLogFile; 131 Log::Level fileLogLevel = Log::INVALID; 126 132 127 133 // See if there's another entry on the command line … … 188 194 break; 189 195 196 case 'o': 197 fileLogFile = optarg; 198 fileLogLevel = Log::EVERYTHING; 199 break; 200 201 case 'O': 202 { 203 fileLogLevel = Logging::GetNamedLevel(optarg); 204 if (fileLogLevel == Log::INVALID) 205 { 206 BOX_FATAL("Invalid logging level"); 207 return 2; 208 } 209 } 210 break; 211 190 212 #ifdef WIN32 191 213 case 'u': … … 204 226 205 227 Logging::SetGlobalLevel((Log::Level)masterLevel); 228 229 std::auto_ptr<FileLogger> fileLogger; 230 if (fileLogLevel != Log::INVALID) 231 { 232 fileLogger.reset(new FileLogger(fileLogFile, fileLogLevel)); 233 } 206 234 207 235 bool quiet = false;
Note: See TracChangeset
for help on using the changeset viewer.
