Fossil SCM
More improvements to the setup-logmenu page.
Commit
767509f6178b88506718aa582113833f99a40bbb800f50070592d11f18c59b18
Parent
b0feaa6955ae932…
1 file changed
+36
-21
+36
-21
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -201,33 +201,51 @@ | ||
| 201 | 201 | login_needed(0); |
| 202 | 202 | return; |
| 203 | 203 | } |
| 204 | 204 | style_header("Log Menu"); |
| 205 | 205 | @ <table border="0" cellspacing="3"> |
| 206 | - setup_menu_entry("Admin Log", "admin_log", | |
| 207 | - "The admin log records configuration changes to the repository.\n" | |
| 208 | - "The admin log is stored in the \"admin_log\" table of the repository.\n" | |
| 209 | - ); | |
| 210 | - setup_menu_entry("Artifact Log", "rcvfromlist", | |
| 211 | - "The artifact log records when new content is added to the repository.\n" | |
| 212 | - "The time and date and origin of the new content is entered into the\n" | |
| 213 | - "Log. The artifact log is always on and is stored in the \"rcvfrom\"\n" | |
| 214 | - "table of the repository.\n" | |
| 215 | - ); | |
| 216 | - setup_menu_entry("User Log", "user_log", | |
| 217 | - "The user log is a record of login attempts. The user log is stored\n" | |
| 218 | - "in the \"accesslog\" table of the respository.\n" | |
| 219 | - ); | |
| 206 | + | |
| 207 | + if( db_get_boolean("admin-log",0)==0 ){ | |
| 208 | + blob_appendf(&desc, | |
| 209 | + "The admin log records configuration changes to the repository.\n" | |
| 210 | + "<b>Disabled</b>: Turn on the " | |
| 211 | + " <a href='%R/setup_settings'>admin-log setting</a> to enable." | |
| 212 | + ); | |
| 213 | + setup_menu_entry("Admin Log", 0, blob_str(&desc)); | |
| 214 | + blob_reset(&desc); | |
| 215 | + }else{ | |
| 216 | + setup_menu_entry("Admin Log", "admin_log", | |
| 217 | + "The admin log records configuration changes to the repository\n" | |
| 218 | + "in the \"admin_log\" table.\n" | |
| 219 | + ); | |
| 220 | + } | |
| 221 | + setup_menu_entry("Artifact Log", "rcvfromlist", | |
| 222 | + "The artifact log records when new content is added in the\n" | |
| 223 | + "\"rcvfrom\" table.\n" | |
| 224 | + ); | |
| 225 | + if( db_get_boolean("access-log",0) ){ | |
| 226 | + setup_menu_entry("User Log", "user_log", | |
| 227 | + "Login attempts recorded in the \"accesslog\" table." | |
| 228 | + ); | |
| 229 | + }else{ | |
| 230 | + blob_appendf(&desc, | |
| 231 | + "Login attempts recorded in the \"accesslog\" table.\n" | |
| 232 | + "<b>Disabled</b>: Turn on the " | |
| 233 | + "<a href='%R/setup_settings'>access-log setting</a> to enable." | |
| 234 | + ); | |
| 235 | + setup_menu_entry("User Log", 0, blob_str(&desc)); | |
| 236 | + blob_reset(&desc); | |
| 237 | + } | |
| 220 | 238 | |
| 221 | 239 | blob_appendf(&desc, |
| 222 | - "The error log is a separate text file to which warning and error\n" | |
| 240 | + "A separate text file to which warning and error\n" | |
| 223 | 241 | "messages are appended. A single error log can and often is shared\n" |
| 224 | 242 | "across multiple repositories.\n" |
| 225 | 243 | ); |
| 226 | 244 | if( g.zErrlog==0 || fossil_strcmp(g.zErrlog,"-")==0 ){ |
| 227 | - blob_appendf(&desc,"The error log is disabled. " | |
| 228 | - "To activate the error log "); | |
| 245 | + blob_appendf(&desc,"<b>Disabled</b>: " | |
| 246 | + "To enable the error log "); | |
| 229 | 247 | if( fossil_strcmp(g.zCmdName, "cgi")==0 ){ |
| 230 | 248 | blob_appendf(&desc, |
| 231 | 249 | "make an entry like \"errorlog: <i>FILENAME</i>\"" |
| 232 | 250 | " in the CGI script at %h", |
| 233 | 251 | P("SCRIPT_FILENAME") |
| @@ -239,11 +257,11 @@ | ||
| 239 | 257 | g.argv[0], g.zCmdName |
| 240 | 258 | ); |
| 241 | 259 | } |
| 242 | 260 | bErrLog = 0; |
| 243 | 261 | }else{ |
| 244 | - blob_appendf(&desc,"In this repository, the error log is in the file" | |
| 262 | + blob_appendf(&desc,"In this repository, the error log is the file " | |
| 245 | 263 | "named \"%s\".", g.zErrlog); |
| 246 | 264 | bErrLog = 1; |
| 247 | 265 | } |
| 248 | 266 | setup_menu_entry("Error Log", bErrLog ? "errorlog" : 0, blob_str(&desc)); |
| 249 | 267 | blob_reset(&desc); |
| @@ -256,16 +274,13 @@ | ||
| 256 | 274 | |
| 257 | 275 | setup_menu_entry("Panic Log", bErrLog ? "paniclog" : 0, |
| 258 | 276 | "Only the most important messages in the Error Log:\n" |
| 259 | 277 | "assertion faults, segmentation faults, and similar malfunctions.\n" |
| 260 | 278 | ); |
| 261 | - | |
| 262 | - | |
| 263 | 279 | setup_menu_entry("Hack Log", bErrLog ? "hacklog" : 0, |
| 264 | 280 | "All code-418 hack attempts in the Error Log" |
| 265 | 281 | ); |
| 266 | - | |
| 267 | 282 | setup_menu_entry("Non-Hack Log", bErrLog ? "hacklog?not" : 0, |
| 268 | 283 | "All log messages that are not code-418 hack attempts" |
| 269 | 284 | ); |
| 270 | 285 | |
| 271 | 286 | @ </table> |
| 272 | 287 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -201,33 +201,51 @@ | |
| 201 | login_needed(0); |
| 202 | return; |
| 203 | } |
| 204 | style_header("Log Menu"); |
| 205 | @ <table border="0" cellspacing="3"> |
| 206 | setup_menu_entry("Admin Log", "admin_log", |
| 207 | "The admin log records configuration changes to the repository.\n" |
| 208 | "The admin log is stored in the \"admin_log\" table of the repository.\n" |
| 209 | ); |
| 210 | setup_menu_entry("Artifact Log", "rcvfromlist", |
| 211 | "The artifact log records when new content is added to the repository.\n" |
| 212 | "The time and date and origin of the new content is entered into the\n" |
| 213 | "Log. The artifact log is always on and is stored in the \"rcvfrom\"\n" |
| 214 | "table of the repository.\n" |
| 215 | ); |
| 216 | setup_menu_entry("User Log", "user_log", |
| 217 | "The user log is a record of login attempts. The user log is stored\n" |
| 218 | "in the \"accesslog\" table of the respository.\n" |
| 219 | ); |
| 220 | |
| 221 | blob_appendf(&desc, |
| 222 | "The error log is a separate text file to which warning and error\n" |
| 223 | "messages are appended. A single error log can and often is shared\n" |
| 224 | "across multiple repositories.\n" |
| 225 | ); |
| 226 | if( g.zErrlog==0 || fossil_strcmp(g.zErrlog,"-")==0 ){ |
| 227 | blob_appendf(&desc,"The error log is disabled. " |
| 228 | "To activate the error log "); |
| 229 | if( fossil_strcmp(g.zCmdName, "cgi")==0 ){ |
| 230 | blob_appendf(&desc, |
| 231 | "make an entry like \"errorlog: <i>FILENAME</i>\"" |
| 232 | " in the CGI script at %h", |
| 233 | P("SCRIPT_FILENAME") |
| @@ -239,11 +257,11 @@ | |
| 239 | g.argv[0], g.zCmdName |
| 240 | ); |
| 241 | } |
| 242 | bErrLog = 0; |
| 243 | }else{ |
| 244 | blob_appendf(&desc,"In this repository, the error log is in the file" |
| 245 | "named \"%s\".", g.zErrlog); |
| 246 | bErrLog = 1; |
| 247 | } |
| 248 | setup_menu_entry("Error Log", bErrLog ? "errorlog" : 0, blob_str(&desc)); |
| 249 | blob_reset(&desc); |
| @@ -256,16 +274,13 @@ | |
| 256 | |
| 257 | setup_menu_entry("Panic Log", bErrLog ? "paniclog" : 0, |
| 258 | "Only the most important messages in the Error Log:\n" |
| 259 | "assertion faults, segmentation faults, and similar malfunctions.\n" |
| 260 | ); |
| 261 | |
| 262 | |
| 263 | setup_menu_entry("Hack Log", bErrLog ? "hacklog" : 0, |
| 264 | "All code-418 hack attempts in the Error Log" |
| 265 | ); |
| 266 | |
| 267 | setup_menu_entry("Non-Hack Log", bErrLog ? "hacklog?not" : 0, |
| 268 | "All log messages that are not code-418 hack attempts" |
| 269 | ); |
| 270 | |
| 271 | @ </table> |
| 272 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -201,33 +201,51 @@ | |
| 201 | login_needed(0); |
| 202 | return; |
| 203 | } |
| 204 | style_header("Log Menu"); |
| 205 | @ <table border="0" cellspacing="3"> |
| 206 | |
| 207 | if( db_get_boolean("admin-log",0)==0 ){ |
| 208 | blob_appendf(&desc, |
| 209 | "The admin log records configuration changes to the repository.\n" |
| 210 | "<b>Disabled</b>: Turn on the " |
| 211 | " <a href='%R/setup_settings'>admin-log setting</a> to enable." |
| 212 | ); |
| 213 | setup_menu_entry("Admin Log", 0, blob_str(&desc)); |
| 214 | blob_reset(&desc); |
| 215 | }else{ |
| 216 | setup_menu_entry("Admin Log", "admin_log", |
| 217 | "The admin log records configuration changes to the repository\n" |
| 218 | "in the \"admin_log\" table.\n" |
| 219 | ); |
| 220 | } |
| 221 | setup_menu_entry("Artifact Log", "rcvfromlist", |
| 222 | "The artifact log records when new content is added in the\n" |
| 223 | "\"rcvfrom\" table.\n" |
| 224 | ); |
| 225 | if( db_get_boolean("access-log",0) ){ |
| 226 | setup_menu_entry("User Log", "user_log", |
| 227 | "Login attempts recorded in the \"accesslog\" table." |
| 228 | ); |
| 229 | }else{ |
| 230 | blob_appendf(&desc, |
| 231 | "Login attempts recorded in the \"accesslog\" table.\n" |
| 232 | "<b>Disabled</b>: Turn on the " |
| 233 | "<a href='%R/setup_settings'>access-log setting</a> to enable." |
| 234 | ); |
| 235 | setup_menu_entry("User Log", 0, blob_str(&desc)); |
| 236 | blob_reset(&desc); |
| 237 | } |
| 238 | |
| 239 | blob_appendf(&desc, |
| 240 | "A separate text file to which warning and error\n" |
| 241 | "messages are appended. A single error log can and often is shared\n" |
| 242 | "across multiple repositories.\n" |
| 243 | ); |
| 244 | if( g.zErrlog==0 || fossil_strcmp(g.zErrlog,"-")==0 ){ |
| 245 | blob_appendf(&desc,"<b>Disabled</b>: " |
| 246 | "To enable the error log "); |
| 247 | if( fossil_strcmp(g.zCmdName, "cgi")==0 ){ |
| 248 | blob_appendf(&desc, |
| 249 | "make an entry like \"errorlog: <i>FILENAME</i>\"" |
| 250 | " in the CGI script at %h", |
| 251 | P("SCRIPT_FILENAME") |
| @@ -239,11 +257,11 @@ | |
| 257 | g.argv[0], g.zCmdName |
| 258 | ); |
| 259 | } |
| 260 | bErrLog = 0; |
| 261 | }else{ |
| 262 | blob_appendf(&desc,"In this repository, the error log is the file " |
| 263 | "named \"%s\".", g.zErrlog); |
| 264 | bErrLog = 1; |
| 265 | } |
| 266 | setup_menu_entry("Error Log", bErrLog ? "errorlog" : 0, blob_str(&desc)); |
| 267 | blob_reset(&desc); |
| @@ -256,16 +274,13 @@ | |
| 274 | |
| 275 | setup_menu_entry("Panic Log", bErrLog ? "paniclog" : 0, |
| 276 | "Only the most important messages in the Error Log:\n" |
| 277 | "assertion faults, segmentation faults, and similar malfunctions.\n" |
| 278 | ); |
| 279 | setup_menu_entry("Hack Log", bErrLog ? "hacklog" : 0, |
| 280 | "All code-418 hack attempts in the Error Log" |
| 281 | ); |
| 282 | setup_menu_entry("Non-Hack Log", bErrLog ? "hacklog?not" : 0, |
| 283 | "All log messages that are not code-418 hack attempts" |
| 284 | ); |
| 285 | |
| 286 | @ </table> |
| 287 |