-ogic, -ogue, -ogy
Words ending in these spellings, such as 'pedagogic' and 'demagogy', are pronounced in two distinct ways: they can be said either with two hard '-g-' sounds (IPA: /g/), as in 'get', or with the first '-g-' hard, and the second soft (IPA: /dʒ/), as in "judge". Words ending in ogue, such as 'pedagogue', 'catalogue' and 'analogue' all have their '-g-' sounds hard.
That is logical, for two reasons. The first is that the spelling '-gu-' was introduced into English (by French-speaking Norman scribes) to indicate that the sound of '-g-' was hard. This can be seen in words of many kinds - 'guess', 'ague' (a very common name for fever in Shakespearean times), 'language', 'rogue', 'meringue', 'intrigue' and 'fugue', to list but a few. The second reason is etymological. The termination '-ogue' comes from Greek. In that language, the letter gamma (Γ, lower case γ), the equivalent of the Roman letter g, was always hard.
However many words from Greek which have been adopted into English have softened the pronunciation of 'g', most noticeably in 'logic' and the names of various sciences and subjects, etc, ending in '-ology'. (These all derive from λογος, or "logos", the Greek for 'word', 'speech', 'discourse' and 'reason'. The '-g-' was softened in most cases as the use of the word passed through French.) In the past five hundred years, to the best of my knowledge, no competent native speaker of English has ever said 'logic' or 'Biology' with hard '-g-', as in 'get'.
It is because of the history of the words, it may be suspected, that the adjectives which end in '-ogic' formed from words that end in '-ogue' are felt by many speakers to have the second '-g-' 'soft' and because the French pattern is ingrained in our language. Both pronunciations are acceptable; many distinguished academics in the field of education use the softer 'ped-[or PEED]-uh-GODJ-i'. In turn, this leads them to say, by a process of back-formation, 'ped-[or PEED]-uh-GODJ-ik[al]'. A taher more old-fashioned idiolect follows thaer alternative route and says 'ped-uh-gog-i' and 'ped-uh-gog-ic[al]'. Use the one with which you feel happiest - or pander to the prejudices of your listeners.