Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

style: use single-line emoji logging on server

Adam Eivyfeee377adbfb
diff --git a/CLAUDE.md b/CLAUDE.md
index d6222ded6b..7fdc937a63 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -45,6 +45,12 @@ Client → HTTP/WebSocket → Routes (validate) → Services (logic) → JSON fi
- **Functional programming** - no classes, use hooks in React
- **Zod validation** - all route inputs validated via `lib/validation.js`
- **Command allowlist** - shell execution restricted to approved commands only
+- **Single-line logging** - use emoji prefixes and string interpolation, never log full JSON blobs or arrays
+ ```js
+ console.log(`🚀 Server started on port ${PORT}`);
+ console.log(`📜 Processing ${items.length} items`);
+ console.error(`❌ Failed to connect: ${err.message}`);
+ ```
## Tailwind Design Tokens
diff --git a/server/index.js b/server/index.js
index cfe4689e13..c99707cdf9 100644
--- a/server/index.js
+++ b/server/index.js
@@ -62,7 +62,7 @@ app.use('/api/commands', commandsRoutes);
// Error handler
app.use((err, req, res, next) => {
- console.error('Server error:', err);
+ console.error(`❌ Server error: ${err.message}`);
res.status(err.status || 500).json({
error: err.message || 'Internal server error',
code: err.code || 'INTERNAL_ERROR'
@@ -78,5 +78,5 @@ app.use((req, res) => {
});
httpServer.listen(PORT, HOST, () => {
- console.log(`PortOS server running at http://${HOST}:${PORT}`);
+ console.log(`🚀 PortOS server running at http://${HOST}:${PORT}`);
});
diff --git a/server/services/socket.js b/server/services/socket.js
index e165743278..5ba27ec396 100644
--- a/server/services/socket.js
+++ b/server/services/socket.js
@@ -5,14 +5,14 @@ const activeStreams = new Map();
export function initSocket(io) {
io.on('connection', (socket) => {
- console.log('Client connected:', socket.id);
+ console.log(`🔌 Client connected: ${socket.id}`);
// Handle log streaming requests
socket.on('logs:subscribe', ({ processName, lines = 100 }) => {
// Clean up any existing stream for this socket
cleanupStream(socket.id);
- console.log(`Starting log stream for ${processName} (${lines} lines)`);
+ console.log(`📜 Log stream started: ${processName} (${lines} lines)`);
// Spawn pm2 logs with --raw flag
const logProcess = spawn('pm2', ['logs', processName, '--raw', '--lines', String(lines)], {
@@ -75,7 +75,7 @@ export function initSocket(io) {
// Cleanup on disconnect
socket.on('disconnect', () => {
- console.log('Client disconnected:', socket.id);
+ console.log(`🔌 Client disconnected: ${socket.id}`);
cleanupStream(socket.id);
});
});