mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 00:46:22 +02:00
Loki logging (#586)
* Consolidate logging into a single module * Added Loki logging * Update tech spec * Add processor label * Fix recursive log entries, logging Loki"s internals
This commit is contained in:
parent
39f6a8b940
commit
f12fcc2652
9 changed files with 415 additions and 80 deletions
|
|
@ -16,6 +16,8 @@ from mcp.server.fastmcp import FastMCP, Context
|
|||
from mcp.types import TextContent
|
||||
from websockets.asyncio.client import connect
|
||||
|
||||
from trustgraph.base.logging import add_logging_args, setup_logging
|
||||
|
||||
from . tg_socket import WebSocketManager
|
||||
|
||||
@dataclass
|
||||
|
|
@ -2040,9 +2042,15 @@ def main():
|
|||
parser.add_argument('--host', default='0.0.0.0', help='Host to bind to (default: 0.0.0.0)')
|
||||
parser.add_argument('--port', type=int, default=8000, help='Port to bind to (default: 8000)')
|
||||
parser.add_argument('--websocket-url', default='ws://api-gateway:8088/api/v1/socket', help='WebSocket URL to connect to (default: ws://api-gateway:8088/api/v1/socket)')
|
||||
|
||||
|
||||
# Add logging arguments
|
||||
add_logging_args(parser)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
# Setup logging before creating server
|
||||
setup_logging(vars(args))
|
||||
|
||||
# Create and run the MCP server
|
||||
server = McpServer(host=args.host, port=args.port, websocket_url=args.websocket_url)
|
||||
server.run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue