deleted a lot of the stuff
This commit is contained in:
parent
d22f7aafa0
commit
3e451558ac
173 changed files with 1313 additions and 30205 deletions
|
|
@ -1,27 +0,0 @@
|
|||
@echo off
|
||||
REM Check Loki status and accessibility
|
||||
|
||||
echo Checking Loki container status...
|
||||
docker ps | findstr "loki"
|
||||
|
||||
echo.
|
||||
echo Testing Loki API...
|
||||
curl -s http://localhost:3100/ready
|
||||
echo.
|
||||
|
||||
echo.
|
||||
echo Testing Loki labels...
|
||||
curl -s "http://localhost:3100/loki/api/v1/labels" | findstr /C:"service"
|
||||
echo.
|
||||
|
||||
echo.
|
||||
echo Checking Grafana...
|
||||
curl -s http://localhost:3000/api/health | findstr /C:"database"
|
||||
echo.
|
||||
|
||||
echo.
|
||||
echo To view logs in Grafana:
|
||||
echo 1. Open http://localhost:3000 in your browser
|
||||
echo 2. Login with admin/admin
|
||||
echo 3. Go to Explore and select Loki as the datasource
|
||||
echo 4. Try the query: {service=~".+"}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
#!/usr/bin/env bun
|
||||
|
||||
/**
|
||||
* Test script to verify the Loki logging integration
|
||||
*/
|
||||
import { Logger, LogLevel } from '@stock-bot/utils';
|
||||
|
||||
// Create a logger for testing
|
||||
const logger = new Logger('test-service', LogLevel.DEBUG);
|
||||
|
||||
// Log test messages
|
||||
logger.info('Starting test log messages...');
|
||||
logger.debug('This is a DEBUG level message');
|
||||
logger.info('This is an INFO level message');
|
||||
logger.warn('This is a WARNING level message');
|
||||
logger.error('This is an ERROR level message');
|
||||
|
||||
// Add some structured data
|
||||
logger.info('Processing trade', { symbol: 'AAPL', price: 190.50, quantity: 100 });
|
||||
logger.info('Processing trade', { symbol: 'MSFT', price: 410.75, quantity: 50 });
|
||||
|
||||
// Simulate an error
|
||||
try {
|
||||
throw new Error('This is a simulated error');
|
||||
} catch (error) {
|
||||
logger.error('An error occurred', error);
|
||||
}
|
||||
|
||||
logger.info('Test log messages complete. Check Grafana at http://localhost:3000 to view logs.');
|
||||
|
||||
// Wait to ensure all logs are sent
|
||||
setTimeout(() => {
|
||||
process.exit(0);
|
||||
}, 1000);
|
||||
Loading…
Add table
Add a link
Reference in a new issue