Add the "on" option to the ".log" command in the CLI. Allow ".log on" and
".log off" even in --safe mode. Enable the .log command for fiddle builds. FossilOrigin-Name: 6bba9100ae81466eeb49845c449cbfddf4f82f18b89f55e6ef575cbf66af63af
This commit is contained in:
parent
d8f13f48a8
commit
96705c1d7a
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C In\sthe\sCLI,\sdo\snot\semit\swarnings\sabout\sthe\sincorrect\susage\sof\ssqlite3_config()\nin\sFiddle.
|
||||
D 2023-02-24T21:05:12.788
|
||||
C Add\sthe\s"on"\soption\sto\sthe\s".log"\scommand\sin\sthe\sCLI.\s\sAllow\s".log\son"\sand\n".log\soff"\seven\sin\s--safe\smode.\s\sEnable\sthe\s.log\scommand\sfor\sfiddle\sbuilds.
|
||||
D 2023-02-24T21:23:53.130
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -622,7 +622,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
|
||||
F src/resolve.c d62c5665279cc7485f9d45b5e20911cc7b19c203f268321a90d05d74f4725750
|
||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||
F src/select.c a6a5cc0bbb97be616a2608cb5d063b6635b920ecd6b7b3445cde88597daf3542
|
||||
F src/shell.c.in 22568122b97d77439c2f1d6afed40be528f04dab47c8cd2752b9fb37555a58ed
|
||||
F src/shell.c.in d362b6faacd8f80d69cfcc7905b51912ecde4c7dcfbc32401d5af43768ce0d5e
|
||||
F src/sqlite.h.in 5f308635ad467b50af858f271e403d14f8bcc574c2610f7cfd2d00f5bb37f616
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h da473ce2b3d0ae407a6300c4a164589b9a6bfdbec9462688a8593ff16f3bb6e4
|
||||
@ -2046,8 +2046,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 7902fb806b33a27932f9ca347246f4ac43091caad0a1536009985b650fd720e2
|
||||
R fbf26774a3bcd50bb0fc2166f101abc4
|
||||
P 847021b402a3e624e22959a70e3e29a4f069c2005534485779cdc018722b5863
|
||||
R a03e248570a718d46ef150580e9f4d5a
|
||||
U drh
|
||||
Z ff696b6fee0d3d6fd70e0e7b389de9b1
|
||||
Z b866616686ca4aa5278ef4fb5c394a30
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
847021b402a3e624e22959a70e3e29a4f069c2005534485779cdc018722b5863
|
||||
6bba9100ae81466eeb49845c449cbfddf4f82f18b89f55e6ef575cbf66af63af
|
@ -4623,8 +4623,10 @@ static const char *(azHelp[]) = {
|
||||
#if !defined(SQLITE_OMIT_LOAD_EXTENSION) && !defined(SQLITE_SHELL_FIDDLE)
|
||||
".load FILE ?ENTRY? Load an extension library",
|
||||
#endif
|
||||
#ifndef SQLITE_SHELL_FIDDLE
|
||||
".log FILE|off Turn logging on or off. FILE can be stderr/stdout",
|
||||
#if !defined(SQLITE_SHELL_FIDDLE)
|
||||
".log FILE|on|off Turn logging on or off. FILE can be stderr/stdout",
|
||||
#else
|
||||
".log on|off Turn logging on or off.",
|
||||
#endif
|
||||
".mode MODE ?OPTIONS? Set output mode",
|
||||
" MODE is one of:",
|
||||
@ -9113,19 +9115,25 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
}else
|
||||
#endif
|
||||
|
||||
#ifndef SQLITE_SHELL_FIDDLE
|
||||
if( c=='l' && cli_strncmp(azArg[0], "log", n)==0 ){
|
||||
failIfSafeMode(p, "cannot run .log in safe mode");
|
||||
if( nArg!=2 ){
|
||||
raw_printf(stderr, "Usage: .log FILENAME\n");
|
||||
rc = 1;
|
||||
}else{
|
||||
const char *zFile = azArg[1];
|
||||
if( p->bSafeMode
|
||||
&& cli_strcmp(zFile,"on")!=0
|
||||
&& cli_strcmp(zFile,"off")!=0
|
||||
){
|
||||
raw_printf(stdout, "cannot set .log to anything other "
|
||||
"than \"on\" or \"off\"\n");
|
||||
zFile = "off";
|
||||
}
|
||||
output_file_close(p->pLog);
|
||||
if( cli_strcmp(zFile,"on")==0 ) zFile = "stdout";
|
||||
p->pLog = output_file_open(zFile, 0);
|
||||
}
|
||||
}else
|
||||
#endif
|
||||
|
||||
if( c=='m' && cli_strncmp(azArg[0], "mode", n)==0 ){
|
||||
const char *zMode = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user