Skip to content

Commit c0f27bb

Browse files
committed
Fix help and usage
1 parent bddd45b commit c0f27bb

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

packages/wp-mysql-proxy/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ on SQLite.
1414
### CLI:
1515

1616
```bash
17-
$ php mysql-proxy.php [--database <path/to/db.sqlite>] [--port <port>]
17+
$ php bin/wp-mysql-proxy.php [--port <port>] [--database <path/to/db.sqlite>] [--log-level <log_level>]
1818

1919
Options:
20-
-h, --help Show this help message and exit.
21-
-d, --database=<path> The path to the SQLite database file. Default: :memory:
22-
-p, --port=<port> The port to listen on. Default: 3306
20+
-h, --help Show this help message and exit.
21+
-p, --port=<port> The port to listen on. Default: 3306
22+
-d, --database=<path> The path to the SQLite database file. Default: :memory:
23+
-l, --log-level=<level> The log level to use. One of 'error', 'warning', 'info', 'debug'. Default: info
2324
```
2425

2526
### PHP:
@@ -31,7 +32,7 @@ require_once __DIR__ . '/vendor/autoload.php';
3132

3233
$proxy = new MySQL_Proxy(
3334
new SQLite_Adapter( $db_path ),
34-
array( 'port' => $port )
35+
array( 'port' => $port, 'log_level' => $log_level )
3536
);
3637
$proxy->start();
3738
```

packages/wp-mysql-proxy/bin/wp-mysql-proxy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
$opts = getopt( $shortopts, $longopts );
1515

1616
$help = <<<USAGE
17-
Usage: php mysql-proxy.php [--database <path/to/db.sqlite>] [--port <port>]
17+
Usage: php bin/wp-mysql-proxy.php [--port <port>] [--database <path/to/db.sqlite>] [--log-level <log_level>]
1818
1919
Options:
2020
-h, --help Show this help message and exit.
21-
-d, --database=<path> The path to the SQLite database file. Default: :memory:
2221
-p, --port=<port> The port to listen on. Default: 3306
23-
-l, --log-level=<level> The log level to use. One of "error", "warning", "info", "debug". Default: info
22+
-d, --database=<path> The path to the SQLite database file. Default: :memory:
23+
-l, --log-level=<level> The log level to use. One of 'error', 'warning', 'info', 'debug'. Default: info
2424
2525
USAGE;
2626

0 commit comments

Comments
 (0)