mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-09 15:11:10 +00:00
New logging system (#319)
* First pass at adding new logging system * NewLogger * NewLogger * WIP * silly bug fix * :D removed files * removed old logging interface * added tests * added tests * Started to add new lines to all f calls * Added subsystem log types * Logger improvements * Further performance improvements * changes to logger and sublogger creation * Renamed Logging types * removed old print statement * changes based on feedback * moved sublogger types to own file * :) * added console as output type * added get level command * added get/set log level via grpc command * added check for output being empty for migration support * first pass at log rotation * added log rotation * :D derp fixed * added tests * changes based on feedback * changed log type * comments * renamed file -> fileSettings * typo fix * changes based on feedback * gofmt ran on additional files * gofmt ran on additional files
This commit is contained in:
@@ -68,7 +68,7 @@ message GetExchangeOTPReponse {
|
||||
string otp_code = 1;
|
||||
}
|
||||
|
||||
message GetExchangeOTPsRequest {}
|
||||
message GetExchangeOTPsRequest {}
|
||||
|
||||
message GetExchangeOTPsResponse {
|
||||
map<string, string> otp_codes = 1;
|
||||
@@ -147,7 +147,7 @@ message OrderbookResponse {
|
||||
repeated OrderbookItem bids = 3;
|
||||
repeated OrderbookItem asks = 4;
|
||||
int64 last_updated = 5;
|
||||
string asset_type = 6;
|
||||
string asset_type = 6;
|
||||
}
|
||||
|
||||
message GetOrderbooksRequest {}
|
||||
@@ -225,7 +225,7 @@ message OfflineCoins {
|
||||
}
|
||||
|
||||
message OnlineCoins {
|
||||
map<string, OnlineCoinSummary> coins = 1;
|
||||
map<string, OnlineCoinSummary> coins = 1;
|
||||
}
|
||||
|
||||
message GetPortfolioSummaryResponse {
|
||||
@@ -371,7 +371,7 @@ message CancelAllOrdersResponse {
|
||||
string exchange = 1;
|
||||
map<string, string> order_status = 2;
|
||||
}
|
||||
repeated Orders orders = 1;
|
||||
repeated Orders orders = 1;
|
||||
}
|
||||
|
||||
message GetEventsRequest {}
|
||||
@@ -455,6 +455,22 @@ message WithdrawResponse {
|
||||
string result = 1;
|
||||
}
|
||||
|
||||
message GetLoggerDetailsRequest {
|
||||
string logger = 1;
|
||||
}
|
||||
|
||||
message GetLoggerDetailsResponse{
|
||||
bool info = 1;
|
||||
bool debug = 2;
|
||||
bool warn = 3;
|
||||
bool error = 4;
|
||||
}
|
||||
|
||||
message SetLoggerDetailsRequest {
|
||||
string logger = 1;
|
||||
string level = 2;
|
||||
}
|
||||
|
||||
service GoCryptoTrader {
|
||||
rpc GetInfo (GetInfoRequest) returns (GetInfoResponse) {
|
||||
option (google.api.http) = {
|
||||
@@ -703,4 +719,17 @@ service GoCryptoTrader {
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetLoggerDetails(GetLoggerDetailsRequest) returns (GetLoggerDetailsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/getloggerdetails"
|
||||
};
|
||||
}
|
||||
|
||||
rpc SetLoggerDetails(SetLoggerDetailsRequest) returns (GetLoggerDetailsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/setloggerdetails",
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user