Output not working

Hello to all,
I'm configuring logstash for parsing a custom log with logstash and sending it to Elasticsearch.

This is my output session:

output {
stdout { codec => rubydebug }
elasticsearch { hosts => [""] }

and everything works fine.

If I remove the line "stdout { codec => rubydebug }", the elasticsearch sending is not working anymore.

Where I'm doing wrong?

That doesn't sound reasonable. Start by checking your logs. You may have to bump the logging verbosity to get additional details.