* these files are named `cron_hhmm.log` (for example 'cron_1013.log' is the log file associated with the cron launched at 10h13)
* the shell command `ls -l $f | cut -d ' ' -f 6,7,8` is efficient to extract the file creation date
@@ -52,7 +56,23 @@ The resulting database own 4 tables
*`name` = a name for this kind of error
*`filtre` = a filtering string that could be used as is, inside a SQL query (with a `LIKE` operator), to get relevant lines
### Queries examples
### Usage
#### SQL clients
To explore results, a SQLite client should be used. Many open source software exist. Such as :
* Command line client, `sqlite3`, itself. Examples of use :
```bash
sqlite3 moodle-db.logs ".schema task"# to see task's columns
sqlite3 moodle-db.logs "select count(*) from tasks;"
```
* https://sqlitebrowser.org/ a lightweight graphic client
* https://dbeaver.io/ a universal full featured client, able to connect to SQLite dabatase, but also to other types of databases such as mariadb, Oracle, and many others.
#### Queries examples
Below, some examples of what could be done with this database.