// @bun
import"./chunk-hhsxm2yr.js";

// src/server/serverLog.ts
function formatError(error) {
  if (!error)
    return "";
  if (error instanceof Error) {
    return `: ${error.message}`;
  }
  return `: ${String(error)}`;
}
function createServerLogger() {
  return {
    info(message) {
      process.stderr.write(`[redscope-server] ${message}
`);
    },
    warn(message) {
      process.stderr.write(`[redscope-server] warning: ${message}
`);
    },
    error(message, error) {
      process.stderr.write(`[redscope-server] error: ${message}${formatError(error)}
`);
    }
  };
}
export {
  createServerLogger
};
