Skip to content

Commit 5e43715

Browse files
committed
content on add logger dependencies with Fano CLI
1 parent b227533 commit 5e43715

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

scaffolding-with-fano-cli/creating-project/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ Read [Application Configuration](/configuration) for more information.
136136

137137
Use `--with-session` to [add session support](/scaffolding-with-fano-cli#add-session-support). Read [Session documentation](/working-with-session) for more information.
138138

139+
```
140+
$ fanocli --project-fcgi=test-fano --config=ini
141+
```
142+
139143
## Add middleware support
140144

141145
Use `--with-middleware` to [add middleware support](/scaffolding-with-fano-cli#add-middleware-support). Read [Middleware documentation](/middlewares) for more information.
@@ -144,6 +148,10 @@ Use `--with-middleware` to [add middleware support](/scaffolding-with-fano-cli#a
144148

145149
Use `--with-csrf` to [add CSRF support](/scaffolding-with-fano-cli#add-csrf-support). Read [Cross-Site Request Forgery (CSRF) protection](/security/csrf-protection) for more information.
146150

151+
## Add logger dependencies
152+
153+
Use `--with-logger` to [add logger dependencies](/scaffolding-with-fano-cli#add-logger-dependencies) to [service container](/dependency-container). Read [Using Loggers](/utilities/using-loggers) for more information.
154+
147155
## Unrelated commit histories issue
148156

149157
`--project-*` command line options creates Git repository and initial commit for you automatically. This behavior may cause problem if you already create remote repository and try to merge local repository with remote one. Git may refuse to merge because they have unrelated commit histories.

scaffolding-with-fano-cli/index.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,24 @@ To view available commands, you can run
4545
```
4646
$ fanocli --help
4747
```
48+
or simply
49+
```
50+
$ fanocli
51+
```
52+
53+
To view help of single command
54+
55+
```
56+
$ fanocli --help --task=[name of task]
57+
```
58+
or
59+
```
60+
$ fanocli --task=[name of task]
61+
```
62+
For example
63+
```
64+
$ fanocli --task=project-scgi
65+
```
4866

4967
## <a name="creating-project"></a>Creating Web Application Project
5068

@@ -349,6 +367,24 @@ $ fanocli --project-scgi=Hello --with-csrf
349367
$ fanocli --project-scgi=Hello --with-csrf
350368
$ fanocli --project-scgi=Hello --config --with-session --with-csrf
351369
```
370+
## <a name="add-logger-dependencies"></a>Add logger dependencies
371+
372+
Any [project creation commands](/scaffolding-with-fano-cli/creating-project), i.e, `--project*` commands, accept additional parameter `--with-logger`. If it is set, then during project creation, [logger](/utilities/using-loggers) dependencies is added to generated project.
373+
374+
Add logger that store logs in file
375+
```
376+
$ fanocli --project-scgi=Hello --with-logger=file
377+
```
378+
379+
Add logger that store logs in database
380+
```
381+
$ fanocli --project-scgi=Hello --with-logger=db
382+
```
383+
384+
Add logger that store logs in [syslog](https://man7.org/linux/man-pages/man3/syslog.3.html)
385+
```
386+
$ fanocli --project-scgi=Hello --with-logger=syslog
387+
```
352388

353389
## <a name="deployment"></a>Deployment
354390

utilities/using-loggers/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,8 @@ container.add(
383383
)
384384
);
385385
```
386+
### Register logger dependencies
387+
You can automate [registering logger dependencies](/scaffolding-with-fano-cli#add-logger-depndencies) when scaffolding project with Fano CLI.
386388

387389
### Retrieve ILogger instance from container
388390

0 commit comments

Comments
 (0)