Illustration: Andrew Dyson.

Illustration: Andrew Dyson.

There are two big stories, intimately linked, that are being played out over the revelations that an Australian intelligence agency in 2009 tapped the phones of Indonesia's President, his wife and his inner circle. One is the revelation itself, and how the new Abbott government handles it diplomatically.

The other is whether Australians should have been told about it at all, whether the media harms our national interest by publishing documents leaked by former US intelligence contractor, now fugitive, Edward Snowden.

The second story isn't the usual ''blame the media'' sideshow or even professional jealousy from those scooped (although there is a bit of that). To date, Australia has mostly ignored the implications of Snowden's leaking of thousands of secret US National Security Agency documents that revealed the growth and extent of surveillance across the globe.

That debate has now arrived here, and it is beyond depressing that the toxicity of the Australian media - worse than I've seen it in more than 20 years in journalism - has led to attacks on the ABC and Guardian Australia for revealing secrets the government would understandably prefer to stay hidden.

It is one thing for former politicians such as Alexander Downer to turn on the ''left-wing'' Guardian for ''shamelessly dribbl[ing] out this material to maximise the pain and embarrassment to the Western alliance''.

It is another for journalists, particularly ones who are vociferous champions of a free press, to fall into line. ''The media, not Abbott, have now damaged our relationship with Indonesia by revealing news against the national interest about activities that were in the national interest,'' wrote the Herald Sun's Andrew Bolt. Fellow News Corp commentator Chris Kenny wondered whether the ABC's managing director, Mark Scott, had personally approved the story since it ''breached national security for no good end''. Fairfax's Paul Sheehan attacked ''the people who lit this conflagration'', the ABC and Guardian.

Miranda Devine took up the conspiracy theory that the Guardian had held off publication of documents for months until after September's election with the purpose of damaging Tony Abbott. The Guardian said it had only received them from its US office, which is sifting through about 200,000 documents, a few days before publication, and had offered the material to the ABC to share resources and maximise impact. That wasn't enough for Devine, for whom this is all about the ''bleeding-heart left and its media enablers'' trying to stop Abbott stopping the boats. (Look, as charmingly parochial as Australia is, the Snowden documents have embarrassed the Democrat Barack Obama a little, too.)

The media doesn't deserve a free pass from anyone. But this is a critical discussion. There is self-evidently tension between the government's proper role in protecting national security, with the secrecy that must entail, and role of the responsible media to scrutinise the oversight and reach of our spying agencies.

The first instinct of governments of any persuasion is to claim ''national security'' when embarrassing material is released - Daniel Ellsberg was at first charged with espionage over his release of the Pentagon Papers revealing the US government's lies in the Vietnam War, and the administration attempted to stop The New York Times from continuing to publish. Would it have been better if the American public never knew?

The bugging of friendly national leaders is spectacular - and Obama has assured German Chancellor Angela Merkel that the tapping of her phone for a decade was wrong and won't happen again - but the broader issue is the pervasiveness and growth of surveillance on almost everything we do electronically.

In the US, there are now reviews into intelligence agencies' activities and oversight and an acknowledgment at high levels that some of it crossed a line. Even the director of US national intelligence, James Clapper, has acknowledged that it was ''clear that some of the conversations this has generated, some of the debate, actually needed to happen''.

The ABC's head of television, Alan Sunderland, says the broadcaster did weigh up national security issues, but this wasn't one of the hard cases when it came to the balance favouring public interest. Mark Scott made the critical distinction between the national interest and the public interest. When weighing up those principles, what might be ''embarrassing and cause difficulties'' in the short term did not override the need for public knowledge and debate about whether intelligence agencies were going too far.

In this digital age, would-be whistleblowers don't even need the filter that an established, credible media organisation can bring to such a swath of documents - they can just throw them up on the internet. With the WikiLeaks documents relating to Australia a few years ago, it was Fairfax that provided that filter. Fairfax also first reported that Australia had spied on Indonesia and other countries from its embassies. There remains value in that institutional oversight, and the ABC and Guardian in this instance said they redacted certain material and sought comment from authorities.

Britain's The Guardian newspaper, in particular, is coming under unprecedented attack from politicians and sections of the media for doing its job. The UK's Daily Mail went so far as to accuse it of being the ''paper that helps Britain's enemies''.

In response last month, 30 editors from around the world, including Fairfax Media's editorial director, Garry Linnell, Age editor-in-chef Andrew Holden and Sydney Morning Herald editor-in-chief Darren Goodsir, backed the The Guardian in publishing the Snowden documents, with Linnell saying that such criticism ''hints at a profound and alarming complacency about the roles of media and government''.

Perhaps it was predictable that such complacency would be so quick to surface here, but it's no less alarming.

Gay Alcorn is an Age/Fairfax columnist and former editor of The Sunday Age. Twitter: gay_alcorn.