-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stefanie Gevaert
committed
Apr 14, 2023
1 parent
de690fd
commit 4881c32
Showing
10 changed files
with
78 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ module.exports = { | |
'', | ||
'configuration', | ||
'collections', | ||
'sync-and-flush', | ||
'documents', | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
--- | ||
sidebar: auto | ||
--- | ||
|
||
# Config | ||
|
||
## foo | ||
|
||
- Type: `string` | ||
- Default: `/` | ||
|
||
## bar | ||
|
||
- Type: `string` | ||
- Default: `/` | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
docs/src/plugin/sync-and-flush.md → docs/src/plugin/documents.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace percipiolondon\typesense\helpers; | ||
|
||
use Craft; | ||
use craft\log\MonologTarget; | ||
use Monolog\Formatter\LineFormatter; | ||
use Psr\Log\LogLevel; | ||
|
||
class FileLog | ||
{ | ||
// Public Static Methods | ||
// ========================================================================= | ||
|
||
/** | ||
* Create an additional file log target named $filename.log that logs messages | ||
* in the category $category | ||
* | ||
* @param string $fileName | ||
* @param string $category | ||
* @return void | ||
*/ | ||
public static function create(string $fileName, string $category): void | ||
{ | ||
// Create a new file target | ||
$fileTarget = new MonologTarget([ | ||
'name' => $fileName, | ||
'categories' => [$category], | ||
'level' => LogLevel::INFO, | ||
'logContext' => false, | ||
'allowLineBreaks' => true, | ||
'formatter' => new LineFormatter( | ||
format: "%datetime% [%channel%.%level_name%] [%extra.yii_category%] %message% %context% %extra%\n", | ||
dateFormat: 'Y-m-d H:i:s', | ||
allowInlineLineBreaks: true, | ||
ignoreEmptyContextAndExtra: true, | ||
), | ||
]); | ||
// Add the new target file target to the dispatcher | ||
Craft::getLogger()->dispatcher->targets[] = $fileTarget; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters