Until v 7.11.0 it was possible to copy the entire output in the Console. However, in v 7.11.0 only a small portion is copied, even if all the output is selected (ctrl-a).
I have tested both the Windows and Mac versions and both only copy a small portion of the console output to the clipboard.
Could you share a screenshot of what youāre seeing? Iām able to copy all contents of the console, but I do have to expand any nested objects to have them included.
Here are some screen captures. I ran a collection from the runner with 217 targets from a CSV-file. Even though I selected all output in the Console, it looks like what is copied to the clipboard is limited to the viewport (or window size).
Note:
The problem occurs whether I apply a filter or not.
After I āselect allā content I can scroll down and see that all content is selected. However, only the visible content (plus a few rows) is copied to the clipboard.
The taller the window/viewport, the more data is copied to the clipboard.
Ahh, I see what you mean ā thank you for the detailed screenshots. Iām able to reproduce this behavior in my own client on MacOS.
Iāve filed an issue for our team on GitHub:
I recommend subscribing there for updates. In the meantime, if you need to save console logs from Collection runs one alternative would be using Newman with a reporter:
Maybe not ideal, but hopefully that helps for now.
Thanks for filing the bug report. I wonder if this issue was introduced in v 7.10.0 when the Postman Console was updated to a new user interface.
Newman isnāt really an option because of my workflow. Iām looking for a log server that accepts RESTful API data pushes. So far, PRTG looks promising. Graylog might support it also.
If only Postman would allow us to write to a local fileā¦
Darn. Can you tell me a bit more about your use-case for storing logs? Pushing the log contents to a supportive API (as you suggested) is one way to get around this for now. In fact, if you wanted you could do something like the JS below to push the logs asynchronously:
var oldFn = console.log;
console.log = function (msg) {
newFn(msg); //could use pm.sendRequest here to send msg to a logging API
oldFn(msg);
};
console.log('logging here');
@john-paul - Thank you for the code snippet - I didnāt know that was possible. I was going to store the output in a variable and write it by using separate requestsā¦
Iām using PM mainly for two purposes:
Generating ad-hoc reports of configuration items and device status of a couple of hundred network appliances. Iāve been using the console log to collect the output.
Updating configurations of network appliances. For change control purposes I need to be able to save all actions and results for each of the devices that are updated.
I realize there are other tools for this (Ansible (Tower), Jenkins, Chef, Puppet), but for ad-hoc efforts PM is working very well.
I like the inline option you mentioned. One of the benefits of using PM in my situation is the modular approach. Being able to just drop requests from our library into a collection really cuts down on the effort. If I were to use a separate request there would be another item to insert and keep track of.
Airtable looks like it could do what I need, but Iām restricted to tools I can run on-prem due to security requirements.
The added āfeaturesā such as forcing the user to click to see the console log are of little use and of near zero value for those who need to copy from the clipboard.
Will this be fixed any time soon?
Also, if you must insist in having sugar such as timings, and things to click, then create an option where the console is all RAW and where everything on the wire is echoed.
After I āselect allā content I can scroll down and see that all content is selected. However, only the visible content (plus a few rows) is copied to the clipboard.
The workaround I found that helped was to group my status messages in to fewer console writes. You can add new lines ā\nā and then write another line via a single console write statement. This overall reduced the amount of space needed in the console and actually also cleaned things up and made it more readable. And I could copy more data.
You could log things per run, and store to an env variable, and then if you are on the last run, write out the entire contents of the logged strings. (ie count iterations in the call, and if you know youāre running 100, on run 100 write out the log - and it could have just one console write statement, and be easy to copy/paste).
HTH
In the version, the console in the Postman app and web view now has a āCopy Allā button, which should hopefully remove the need for the workaround.