mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
WebServer: Use Core::DateTime for logging timestamps
This commit is contained in:
parent
b8cf83926a
commit
2c9d94c6b9
Notes:
sideshowbarker
2024-07-19 09:25:59 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2c9d94c6b97
1 changed files with 6 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "Client.h"
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/HttpRequest.h>
|
||||
#include <stdio.h>
|
||||
|
@ -123,7 +124,11 @@ void Client::send_error_response(unsigned code, const StringView& message, const
|
|||
|
||||
void Client::log_response(unsigned code, const Core::HttpRequest& request)
|
||||
{
|
||||
printf("%lld :: %03u :: %s %s\n", time(nullptr), code, request.method_name().characters(), request.resource().characters());
|
||||
printf("%s :: %03u :: %s %s\n",
|
||||
Core::DateTime::now().to_string().characters(),
|
||||
code,
|
||||
request.method_name().characters(),
|
||||
request.resource().characters());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue