Updated README.md formatting
This commit is contained in:
parent
d5831486eb
commit
42bd16d5ee
1 changed files with 8 additions and 15 deletions
23
README.md
23
README.md
|
@ -1,7 +1,6 @@
|
||||||
# LogLib
|
# LogLib
|
||||||
|
|
||||||
A logging library for PHP/ncc, this was quickly thrown together
|
A logging library for PHP/ncc, this was quickly thrown together to provide a simple logging interface and to test out
|
||||||
to provide a simple logging interface and to test out
|
|
||||||
NCC's capabilities for PHP.
|
NCC's capabilities for PHP.
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
@ -25,8 +24,7 @@ The library can be installed using ncc:
|
||||||
ncc install -p "nosial/libs.log=latest@n64"
|
ncc install -p "nosial/libs.log=latest@n64"
|
||||||
```
|
```
|
||||||
|
|
||||||
or by adding the following to your project.json file under
|
or by adding the following to your project.json file under the `build.dependencies` section:
|
||||||
the `build.dependencies` section:
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -36,8 +34,7 @@ the `build.dependencies` section:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't have the n64 source configured you can add it
|
If you don't have the n64 source configured you can add it by running the following command:
|
||||||
by running the following command:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ncc source add --name n64 --type gitlab --host git.n64.cc
|
ncc source add --name n64 --type gitlab --host git.n64.cc
|
||||||
|
@ -60,8 +57,7 @@ make release
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
The usage of this library is very simple, there are
|
The usage of this library is very simple, there are multiple error levels that can be used to log messages
|
||||||
multiple error levels that can be used to log messages
|
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
@ -78,10 +74,8 @@ multiple error levels that can be used to log messages
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
To display the log messages, you can run your program
|
To display the log messages, you can run your program with the `--log-level` argument, this will display all messages
|
||||||
with the `--log-level` argument, this will display all
|
with a level equal to or higher than the one specified.
|
||||||
messages with a level equal to or higher than the one
|
|
||||||
specified.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
myprogram --log-level info
|
myprogram --log-level info
|
||||||
|
@ -99,9 +93,8 @@ The log level can be set to one of the following:
|
||||||
|
|
||||||
The default log level is `info`.
|
The default log level is `info`.
|
||||||
|
|
||||||
> Note: Log messages are only displayed if the program
|
> Note: Log messages are only displayed if the program is run from the command line, if you are running the program
|
||||||
is run from the command line, if you are running the
|
> from a web server, the log messages will be shown
|
||||||
program from a web server, the log messages will be shown
|
|
||||||
|
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
Loading…
Add table
Reference in a new issue