File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ public function log(): void
112
112
'warn ' => $ _GET ['warn ' ] ?? true ,
113
113
'error ' => $ _GET ['error ' ] ?? true ,
114
114
'info ' => $ _GET ['info ' ] ?? true ,
115
- 'limit ' => $ _GET ['limit ' ] ?? 100 ,
115
+ 'limit ' => $ _GET ['limit ' ] ?? 500 ,
116
116
];
117
117
118
118
$ loglines = file (Model::ERROR_LOG );
@@ -146,7 +146,7 @@ public function log(): void
146
146
$ this ->showtemplate ('adminlog ' , array_merge ([
147
147
'logs ' => array_reverse ($ logs , true ),
148
148
'total ' => $ t ,
149
- 'filesize ' => $ stats ['size ' ] / 8 ,
149
+ 'filesize ' => $ stats ['size ' ],
150
150
'filelines ' => $ filelines ,
151
151
], $ filters ));
152
152
}
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ public function update(string $page): void
103
103
104
104
/**
105
105
* @throws RuntimeException when saving page fails
106
+ *
107
+ * @todo This should not throw RuntimeException but manage the exception itself and log friendly error
106
108
*/
107
109
public function add (string $ page ): void
108
110
{
@@ -119,10 +121,14 @@ public function add(string $page): void
119
121
$ this ->page = $ this ->pagemanager ->newpage (array_merge ($ this ->recievejson (), ['id ' => $ page ]));
120
122
$ this ->page ->addauthor ($ this ->user ->id ());
121
123
$ this ->pagemanager ->add ($ this ->page );
124
+ $ user = $ this ->user ->id ();
125
+ Logger::info ("User ' $ user' successfully added Page ' $ page' " );
122
126
}
123
127
124
128
/**
125
129
* @throws RuntimeException when saving page fails
130
+ *
131
+ * @todo This should not throw RuntimeException but manage the exception itself and log friendly error
126
132
*/
127
133
public function put (string $ page ): void
128
134
{
Original file line number Diff line number Diff line change @@ -333,6 +333,8 @@ public function log(string $page): void
333
333
* Match domain.com/PAGE_ID/add
334
334
*
335
335
* @throws RuntimeException if page creation failed
336
+ *
337
+ * @todo This should not throw RuntimeException but manage the exception itself and log friendly error
336
338
*/
337
339
public function add (string $ page ): void
338
340
{
@@ -360,6 +362,8 @@ public function add(string $page): void
360
362
}
361
363
$ this ->page ->addauthor ($ this ->user ->id ());
362
364
$ this ->pagemanager ->add ($ this ->page );
365
+ $ user = $ this ->user ->id ();
366
+ Logger::info ("User ' $ user' successfully added Page ' $ page' " );
363
367
$ this ->routedirect ('pageedit ' , ['page ' => $ this ->page ->id ()]);
364
368
}
365
369
Original file line number Diff line number Diff line change 76
76
</section>
77
77
</main>
78
78
<footer>
79
- w_error.log | parsed lines: <?= $ total ?> | file lines: <?= $ filelines ?> | file size: <?= $ this ->readablesize ($ filesize ) ?> o
79
+ w_error.log | file lines: <?= $ filelines ?> | file size: <?= $ this ->readablesize ($ filesize ) ?> o
80
80
</footer>
81
81
82
82
<?php $ this ->stop ('page ' ) ?>
You can’t perform that action at this time.
0 commit comments