Skip to content

Commit

Permalink
fix log levels
Browse files Browse the repository at this point in the history
  • Loading branch information
ahau-square committed Jan 7, 2025
1 parent a5d0dd2 commit 9bf6b81
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 0 additions & 2 deletions crates/goose-cli/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ pub fn setup_logging() -> Result<()> {
let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| {
// Set default levels for different modules
EnvFilter::new("")
// Set goose module to INFO only
.add_directive("goose=debug".parse().unwrap())
// Set goose-cli to INFO
.add_directive("goose_cli=info".parse().unwrap())
// Set everything else to WARN
.add_directive(LevelFilter::WARN.into())
Expand Down
2 changes: 1 addition & 1 deletion crates/goose-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ enum CliProviderVariant {

#[tokio::main]
async fn main() -> Result<()> {
setup_logging();
setup_logging()?;

let cli = Cli::parse();

Expand Down
8 changes: 4 additions & 4 deletions crates/goose-server/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ pub fn setup_logging() -> Result<()> {
let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| {
// Set default levels for different modules
EnvFilter::new("")
// Set goose module to INFO only
.add_directive("goose=info".parse().unwrap())
// Set goose module to INFO only, but allow ERROR level for all submodules
.add_directive("goose=debug".parse().unwrap())
// Set goose-server to INFO
.add_directive("goose_server=info".parse().unwrap())
// Set tower-http to INFO for request logging
Expand All @@ -84,8 +84,8 @@ pub fn setup_logging() -> Result<()> {

// Build the subscriber with required layers
let subscriber = Registry::default()
.with(file_layer)
.with(console_layer.with_filter(env_filter));
.with(file_layer.with_filter(env_filter))
.with(console_layer.with_filter(LevelFilter::INFO));

// Initialize with Langfuse if available
if let Some(langfuse) = langfuse_layer::create_langfuse_observer() {
Expand Down
2 changes: 0 additions & 2 deletions crates/goose/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,6 @@ impl Agent {
let outputs = futures::future::join_all(futures)
.await;

debug!("All tool requests completed");

// Create a message with the responses
let mut message_tool_response = Message::user();
// Now combine these into MessageContent::ToolResponse using the original ID
Expand Down

0 comments on commit 9bf6b81

Please sign in to comment.