Skip to content

Commit

Permalink
fix: remove timestamp and level fields
Browse files Browse the repository at this point in the history
  • Loading branch information
airkei committed Jan 9, 2025
1 parent ca4f3d9 commit af04d59
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 54 deletions.
14 changes: 1 addition & 13 deletions proto/otaclient_iot_logging_server_v1.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ enum LogType {
METRICS = 1;
}

enum LogLevel {
UNSPECIFIC = 0;
TRACE = 1;
DEBUG = 2;
INFO = 3;
WARN = 4;
ERROR = 5;
FATAL = 6;
}

enum ErrorCode {
NO_FAILURE = 0; // Success
SERVER_QUEUE_FULL = 1; // Error: Server queue is full
Expand All @@ -46,9 +36,7 @@ enum ErrorCode {
message PutLogRequest {
string ecu_id = 1; // target ECU ID
LogType log_type = 2; // log type
uint64 timestamp = 3; // log timestamp (UNIX time in milliseconds)
LogLevel level = 4; // log level
string message = 5; // log message
string message = 3; // log message
}

message PutLogResponse {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from typing import ClassVar as _ClassVar
from typing import Optional as _Optional
from typing import Union as _Union

from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union

DESCRIPTOR: _descriptor.FileDescriptor

Expand All @@ -13,16 +10,6 @@ class LogType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
LOG: _ClassVar[LogType]
METRICS: _ClassVar[LogType]

class LogLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []
UNSPECIFIC: _ClassVar[LogLevel]
TRACE: _ClassVar[LogLevel]
DEBUG: _ClassVar[LogLevel]
INFO: _ClassVar[LogLevel]
WARN: _ClassVar[LogLevel]
ERROR: _ClassVar[LogLevel]
FATAL: _ClassVar[LogLevel]

class ErrorCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []
NO_FAILURE: _ClassVar[ErrorCode]
Expand All @@ -32,36 +19,23 @@ class ErrorCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):

LOG: LogType
METRICS: LogType
UNSPECIFIC: LogLevel
TRACE: LogLevel
DEBUG: LogLevel
INFO: LogLevel
WARN: LogLevel
ERROR: LogLevel
FATAL: LogLevel
NO_FAILURE: ErrorCode
SERVER_QUEUE_FULL: ErrorCode
NOT_ALLOWED_ECU_ID: ErrorCode
NO_MESSAGE: ErrorCode

class PutLogRequest(_message.Message):
__slots__ = ["ecu_id", "log_type", "timestamp", "level", "message"]
__slots__ = ["ecu_id", "log_type", "message"]
ECU_ID_FIELD_NUMBER: _ClassVar[int]
LOG_TYPE_FIELD_NUMBER: _ClassVar[int]
TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
LEVEL_FIELD_NUMBER: _ClassVar[int]
MESSAGE_FIELD_NUMBER: _ClassVar[int]
ecu_id: str
log_type: LogType
timestamp: int
level: LogLevel
message: str
def __init__(
self,
ecu_id: _Optional[str] = ...,
log_type: _Optional[_Union[LogType, str]] = ...,
timestamp: _Optional[int] = ...,
level: _Optional[_Union[LogLevel, str]] = ...,
message: _Optional[str] = ...,
) -> None: ...

Expand Down

0 comments on commit af04d59

Please sign in to comment.